The jar command successfully completed the Java-jar command but prompted "No master manifest attribute"! Http://www.bieryun.com/1181.html
The jar command successfully completed the Java-jar command but prompted "No master manifest attribute"! I do not understand, I do not know how long before I used the jar and run successfully, but now do not, get a big half a day, I want to die. It is becoming increasingly felt that Java development is inconvenient and inconvenient to use. It's a double-loser!
JAR-CVF Allchar.jar Allchar.class (only one class file)
Java-jar Allchar.jar
Tip "No Master manifest attribute"
Javaw-jar Allchar.jar had no clue.
Make sure I've used the jar to pack and succeed before.
Method One,
?
After you have made the jar package, you need to change the manifest file. Open the generated jar with a MANIFEST.MF file and open it. Then there is a line main-class: This is empty. Add your class file to the back. For example, your file is Exec.java compiled is exec.class. So here's the exec. then enter, Be sure to have a carriage return after the name to get the cursor to the next line. This will allow you to generate a jar package to find your main class to run. It is not inconvenient to use Java development, it is just that you are not fine.
?
Method Two, when you export the jar package in eclipse, the following actions can also be
First, under the Jar File Specification dialog box in the Export Jar Exporting Wizard, select Export all output folders for check projects. Such as:
Second, in the wizard, next to the Jar Manifest Specification dialog box, in your main class input box, select your entry class. Such as
?
Then, finish, the resulting jar file can be executed in the Java Virtual machine via the Java-jar ***.jar command.
The jar command successfully completed the Java-jar command but prompted "No master manifest attribute"!