
Using the ant task to create the manifest file on-the-fly gives you and entry like: Manifest-Version: 1.0Ĭreated-By: 1.4.2_07-b05 (Sun Microsystems Inc.)Ĭreating the manifest file myself, with the bare essentials fixes the issue: Manifest-Version: 1.0 This is the common issue with "manifest" in the error? Yes it happens a lot, here's a link:

|-myJAR (creates another directory making the file corrupted)** When you use a zip tool to unpack, change files and zip again, normally the JAR structure changes to this structure which is incorrect, since another directory level is added on the top of the file system making it a corrupted file as is shown below: **myJAR (Main-Directory) Once you're done try execute it on the command line using: java -jar myJAR.jar If your JAR complies with these rules it will work doesn't matter if you build it manually by using a ZIP tool and then you changed the extension back to.

|-MainClass.class (must to implement the main method, mandatory) |-MANIFEST.MF (Mandatory Main-class: com.MainClass) The problem occurs when you zip back the folder.Ī valid Runnable/Executable JAR has the next structure: myJAR (Main-Directory)

This regularly occurs when you change the extension on the JAR for ZIP, extract the zip content and make some modifications on files such as changing the MANIFEST.MF file which is a very common case, many times Eclipse doesn't generate the MANIFEST file as we want, or maybe we would like to modify the CLASS-PATH or the MAIN-CLASS values of it.
