I create jar files like that: - jar -cvmf manifest.txt app1.jar *.class
I run them like that:
Ok so far. My program is up and running.
When I try to run the same jar files with double click ( in Win XP I associate them with java.exe) I get an error, Exception in thread main...no class found.
What am I doing wrong?
Thanks
stack
Probably Windows isn't adding the "-jar" argument and therefore it can't find any of your classes - especially not the class containing the main method.
To set it that way, open the place, where you associated JAR files with java.exe and click on "More" (or whatever the button may be called). If there's an Operation called "open", edit that, otherwise create a new one called "open". It should have the following value:
- "C:\Program Files\Java\jre1.6.0_02\bin\java.exe" -jar "%1" %*
Of course, you'll have to change the Path according to where java.exe lies.
Greetings,
Nepomuk