Eclipse exports jar packages and MANIFEST. MF File

Source: Internet
Author: User

Eclipse Export JAR Package, File-export-jar File-next...-finish in the project, pay attention to choosing your own program main Class, The MANIFEST.MF file in the jar package contains information such as the main program entry for the jar and the storage location of the dependent jar.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/45/DB/wKiom1PsjL3hp7I1AAAnnvHjOaY432.png "title=" 1.PNG " alt= "Wkiom1psjl3hp7i1aaannvhjoay432.png"/>

Java-jar Test.jar

After you export the jar package, if you have an external package dependency, you also need to modify the MANIFEST in the jar package . MF File

Manifest-version:1.0main-class:modification. Appframeclass-path:lib/classes12.jarmanifest-version for version Information Class-path when the program has an external package dependency, you can create a Lib directory under the current directory and put it in a dependent jar package MAIN-CL This property is missing from the main entry entry, the program will not find the main entrance failed to load Main-class manifest attribute from Test.jar

You can edit the meta-inf\manifest in Test.jar directly under Windows using the WinRAR tool. MF File

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/45/DD/wKioL1PslM_CV-piAACXKtDjN7U474.png "title=" 4.PNG " alt= "Wkiol1pslm_cv-piaacxktdjn7u474.png"/>


If there are other configuration files in the project, you also need to place them at the directory level and the location required by the program.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/45/DC/wKiom1Psk8Ww55VFAABGra5OuZk044.png "title=" 2.PNG " alt= "Wkiom1psk8ww55vfaabgra5ouzk044.png"/>

This article is from the "method is more than the problem" blog, please be sure to keep this source http://xubcing.blog.51cto.com/3502962/1540108

Related Article

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.