If I double-click on my jar file, I get "Could not find the main class: HelloWorld. Program will exit."
When I run it from the command line as "java -jar HelloWorld.jar" it works fine.
It also runs fine from the Eclipse.
Other jar files, not written by me, run fine from the double click.
I have set CLASSPATH variable to "." and added the jdk path to the PATH variable.
I have checked that jars are associeted with the javaw.exe
"friend's jar that I can run from the double click"
To make a jar file I'm using Eclipse->File->Export->Java->Runnable JAR file->Current project's launch configuration & the first radio button->finish
Also, other people get the same error when trying to run my jar.