jar file issues with windows 7

failed2k

New member
So I just got a new system put together, I'm not much of a computer person, but i'm not bad with them either, here is my issue, and it's REALLY simple.

I want to use the Daily builds, on the old comp, it was as simple as clicking on the things, and bam, no problems. On this comp windows 7 doesn't know what to open the file with, so I tried to select java manually(sun version) and it seems no matter what application/exe I select in the java folder to run it manually, I'm having no luck. I can run the Exe mafia builds with no problems, but I prefer the daily builds especially during crimbo.

Anyone know what I should do?
 

Spiny

Member
First, are you able to run the .jar files from the command line?

For example:

Code:
java -jar Kolmafia-7917.jar

The below was shamefully copied from some random help website I found using google:

If you are able to run from Command Prompt, I would suggest you to set association for your Java executable .jar file in Control Panel, Default Programs as to which program should open these files.

Please see the link below for more information,

http://windows.microsoft.com/en-US/windows-vista/Change-which-programs-Windows-uses-by-default



And set path for Java in System Environment Variables, which you can do it manually by following the steps below: -

Assuming C:\ is the drive where you have installed Java Runtime Environment, please change the drive letter according to installation of JRE (Java Runtime Environment) on a particular drive.



Open a command prompt window using "Run as administrator”, and then type: -

C:\>assoc .jar=jarfile

C:\>ftype jarfile="C:\Program Files\Java\jre\bin\javaw.exe" -jar "%1" %*

C:\>ftype jarfile="C:\path\to\your\javaw.exe" -jar "%1" %*
 

mottsy

Member
Quick question, did you download java correctly...

Dumb question i know, but used to be really complicated
 

failed2k

New member
To quickly respond to both of mottsy's questions. I'm not opening it from recent documents, and I believe that Java is installed correctly given that the EXE versions of Kolmafia boot up fine.

Spiny- Okaym I tried opening it through command prompt with the command given and it says that java is not recognized as a command. when I try to select java manually from the Open With, it pops up a cmd window and closes it super fast, I cannot for the life of me read it, since it only opens for literally a instant.
 

Spiny

Member
More shameless copy and pasting as my initial advice may not have been thorough enough... when you try to run from from the command line, you need to start from where javaw.exe is located:

Code:
Open a command prompt window using "Run as administrator", and then type:
ftype jarfile="C:\path\to\your\javaw.exe" -jar "%1" %*
Your javaw.exe file should be somewhere under the Program Files\Java tree, if you have installed the Java Development Kit. Otherwise, you can probably find it in Windows\System32. Use java.exe if you want your application to run in a console 
window, or javaw.exe if it has its own window.
 
Top