Thursday, May 15, 2014

creating a java jar file under Mac OS

In theory, this is easy. In practice, it is easy if you remember that you need a newline at the BOTTOM of the manifest file. The Manifest.txt just needs a new line, and it all works. It took me a few hours to figure this out. :/
Main-Class: testclass

And you just create the .jar file from your .class files:
jar cfm spicespi.jar Manifest.txt *.class
And then you can run it (or just click it in Mac OS.)
java -jar testclass.jar

No comments:

Post a Comment