$ jar -cvmf MANIFEST.MF helloworld.jar HelloWorld.classīut this still requires your users to invoke the Java interpreter with the -jar option. $ echo Main-Class: HelloWorld > MANIFEST.MF The manifest must contain an entry Main-Class that specifies which is the class defining the main method for your application. There are plenty of tutorials showing how to implement this feature using Ant, Maven, Eclipse, Netbens, etc.Īnyway in its basic form, it just requires to add a MANIFEST.MF file to the jar package. Every Java programmer knows - or should known - that it is possible to create a runnable Java package archive (JAR), so that in order to launch an application it is enough to specify the jar file name on the Java interpreter command line along with the -jar parameter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |