Computing.Net > Forums > Programming > Help with JAR files

Help with JAR files

Reply to Message Icon

Original Message
Name: Jimmytherifle
Date: March 6, 2008 at 10:26:53 Pacific
Subject: Help with JAR files
OS: Vista
CPU/Ram: 2.47 GB
Comment:

I'm having a bit of trouble getting my JAR files to properly execute, and I was wondering if I could get a bit of help. I'm using the BlueJ IDE to create my programs and JAR files. The JAR files get created correctly, however, when I try to execute them, my cursor flashes, says it's loading something, then nothing else happens. Can anyone offer me some suggestions as to why this is happening?


Report Offensive Message For Removal


Response Number 1
Name: klint
Date: March 7, 2008 at 01:50:53 Pacific
Reply: (edit)

I am not familiar with BlueJ, nor have I ever used Vista, so what I say may be wrong, but you could try this.

Run RegEdit (I am not sure if Vista allows users to run RegEdit, but Windows XP does.) Go to
HKEY_CLASSES_ROOT\.jar - it should have a value of "jarfile". Now go to
HKEY_CLASSES_ROOT\jarfile\shell\open\command
and check the value. Mine is
"C:\Program Files\Java\jre1.6.0_03\bin\javaw.exe" -jar "%1" %*

Yours may say java.exe (which is just the console-based version of javaw.exe) or it may run some BlueJ-specific executable.

If the above value looks wrong on your machine, try and fix it (take a backup first.)

Try running that command line from your Command Prompt window. If that works, it should also work when you double-click a jar file in Explorer. Let us know how you get on.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Help with JAR files

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge