![]() ![]() WARNING: Duplicate name in Manifest: Main-Class.Įnsure that the manifest does not have duplicate entries, and Then run the below command to update the entry jar uvfm MyProject.jar META-INF/MANIFEST.MF We will rename the manifest.txt to MANIFEST.MF and put it inside META-INF directory. Since manifest file is located at META-INF/MANIFEST.MF. So we can use the jar command to update the manifest file.įor updating a file using jar command, file structure should be similar otherwise it will add new file to another directory. ![]() What if my project has multiple entry points and I want to change the entry point without creating the jar again. That’s great when we have single class with main method. Run Jar File from command java -jar MyProject.jar Now we are ready to run jar file through command line. Manifest-Version and Created-By entries are added by jar command. Now when I unpack and check the contents of MANIFEST.MF file, it contains following data. Now we will use jar command to create jar file with our manifest file jar cvfm MyProject.jar manifest.txt comĪdding: com/journaldev/(in = 0) (out= 0)(stored 0%)Īdding: com/journaldev/test/(in = 0) (out= 0)(stored 0%)Īdding: com/journaldev/test/MyTest.class(in = 444) (out= 303)(deflated 31%)Īdding: com/journaldev/util/(in = 0) (out= 0)(stored 0%)Īdding: com/journaldev/util/MyUtil.class(in = 444) (out= 304)(deflated 31%) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |