Tuesday, June 4, 2013

How to run jar file from command prompt

First go to directory where the jar file is present and execute the following command
java -jar YourSample.jar

If you got following error add MANIFEST.MF file and following entry

Error:Failed to load Main-Class manifest attribute from

Answer : (Enter as Main-Class:package.MainClassName)
manifest-Version: 1.0
Main-Class: com.java.TestSuresh
Ref from: http://stackoverflow.com/questions/2848642/how-to-setup-main-class-in-manifest-file-in-jar-produced-by-netbeans-project

No comments:

This site providing you to JAVA Language easy way. I think if you are beginner to JAVA refer this to implements you knowledge using only with very simplest codes.