How do I deploy an application as a JAR file and start it with the java -jar command?

John Zukowski

To use the java -jar command, the manifest file for your JAR file needs to include the following line, specifying which class to execute its main:

Main-Class: classname

You would need to replace classname with the appropriate class to use.