Hi !!!
I try run a stand-alone application from a jar file and it is not working. I will give the details below.
1. I have a jar file called Hello.jar with the following content
- directory META-INF which contains the file MANIFEST.MF
- directory tests which contains the file HelloWorld.class.
In the HelloWorld.class the method main is implemented.
2. The file MANIFEST.MF has the following format:
Manifest-Version: 2.0
Main-Class: tests.HelloWorld
Created-By: 1.3.0 (Sun Microsystems Inc.)
My-Information: this is my own added field
The lines and the end of file are properly ended with a CR\LF pair.
As far as I read from SUN documentation there are 2 ways to execute the code from Hello.jar
1. java -cp Hello.jar tests.HelloWorld
2. java -jar Hello.jar -> which uses the MANIFEST.MF file for the
detection of the main class.
Unfortunately none of the above methods are working.
Where is the mistake ????
By the way, as OS I am using WIN 2K PROFESSIONAL.
PS: I attached the jar file to this post.
The good answers will be rewarded !!!!
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.