![]() Taking advantage of this possibility the trick is just to embed a runnable jar file into a Bash script file. This technique it is based on the ability to append a generic binary payload to a Linux shell script. There are many reasons why it would be preferable to have your app runnable by simply invoking it on the terminal shell like any other command. $ 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 |