How to run Java .jar without MANIFEST.MF?

eonil picture eonil · Mar 25, 2013 · Viewed 26.6k times · Source

Is it possible to run a Java app which doesn't contain MANIFEST.MF file? Of course, there's static main method,just lacks manifest file. And the app is depending on several external .jar files.

If is this possible, how to do that?

Answer

BackSlash picture BackSlash · Mar 25, 2013

It is possible, you can specify the class to run from the command line:

java -cp yourJar.jar your.main.Class

Same question here:

How to run a class from Jar which is not the Main-Class in its Manifest file