Minor issues encountered with the Java-jar command (MAVEN project) |xx.jar no master manifest or error:invalid or corrupt jarfile Xx.jar

Source: Internet
Author: User

No master list or error:invalid or corrupt jarfile Xx.jar in Xx.jar

  This problem is encountered because your jar package does not have a portal set for the main class.

  That is, Main-class:packagename.classname is not defined in the MANIFEST.MF file of the Meta-inf folder(here Main-class: with Packagename.classname A space and a newline character at the end of the line)

  We can open your export jar with WinRAR (do not unzip), find the Manifest.mf file in the Meta-inf folder, open it with Notepad, add Main-class: Package name. Main class name

But the jar files packaged by the MAVEN project can't be run, even if you're MANIFEST. MF file added Main-class also cannot be resolved

The reason may be that your MAVEN project's pom.xml configuration is too simple or does not specify a package type, because a MAVEN project packaged as a jar file requires some specific environments to be configured!

Minor issues encountered with the Java-jar command (MAVEN project) |xx.jar no master manifest or error:invalid or corrupt jarfile Xx.jar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.