Not too long ago I asked a question about distribution of java jar files...that was perfectly answered and my jar files were completely working fine...but in a past few days they have stopped working directly by double clicking and i have to run it through the command java -jar .jar what could be the possible reason behind this...i mean i have already included the manifest file and the main classes have also been defined.... I have really no idea whats going on here!! previously asked question Distributing java application
1 Answer
Since it works with java -jar ..., it can be safely assumed that java can be accessed via the classpath.
Check that the .jar file type is still associated with Java. How to do this depends on your operating system.
If this doesn't work, try Jarfix. It helped me once with exactly the same problem.
PS: Jarfix works only on Windows.
2 Comments
anichhangani
Jarfix worked fine..but still i have no clue what happened!! Will u care to elaborate.
Radu Murzea
@AnirudhChhangani My best guess is that you updated Java (manually or automatically) and that might have screwed up something. I honestly can not give a more precise answer because that would be just guessing (which is worthless). I'm glad it worked, though :) .