I have a Java application in a .jar-file. I can start it by typing java -jar myapp.jar and the application starts, but if I double-click on the .jar-file, nothing happens. What can be wrong? How can I fix this? I use Windows Vista.

I have tried on another computer and it works fine there. It must be something with my Java configuration. I have another question with a similar problem on I can not start Eclipse anymore.

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

I had the same problem and finally solved it, download the jdk1.5 upgrade 3.
I had the exact same problem, even after reinstall, I was getting the main class not found error.
After installing jdk1.5 upgrade 3. Problem solved!

link|improve this answer
Is this the only alternative? 1.5_u3 is very old. – Jonas May 28 '10 at 8:42
If you're using Win XP (and maybe some earlier versions), try this: Start -> My Computer -> Tools -> Folder Options... -> File Types. There will be a list of extensions, so go to JAR. If it opens with javaw, click Change and select "Java(TM) 2 Platform Standard Edition binary", and all should be well. I had the same problem, but this fixed it. – admintech May 28 '10 at 8:49
I uninstallad all my jre and jdk, and reinstalled the latest version, that solved the problem. Thanks. – Jonas Jun 22 '10 at 15:15
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.