Use fat jar in myeclipse to generate executable jar

Source: Internet
Author: User

First download the fat jar:

Http://sourceforge.net/project/showfiles.php? Group_id = 115990 & package_id = 125924

After downloading the package, decompress it. There is a plugins folder with a jar package. Set thisFolderPut the dropins directory of myeclipse. Here, my path is D:/program files/genuitec/myeclipse 8.5/dropins, which is for your reference only. After restarting eclipse, right-click the project and you will see an option with the green plus sign in front-> build fat jar, which indicates that the installation is successful.

If you want to package your project into an executable jar, right-click the project and choose build fat jar. An interface is displayed. The interface attributes are set as follows:

Jar-Name: name of the jar to be generated

Manifest: The most important configuration file, but you do not need to worry about this step, do not change

Main-class: which main function does your jar start from?

Class-path: Usually a point ".". If you use an external class, you need to set an external class. For example, my project uses jpcap. jar and jpcap. DLL, then my path is ". jpcap. jar jpcap. DLL ", remember that point cannot be omitted, and there must be a space before the external class. These attributes are written to manifest.

Click "Next" and a page appears asking you to choose to package the required classes. You can select the external dependent packages because we have already set them, so do not select them. An executable jar package is generated in your project directory, at this time, remember to copy your external class (that is, it is in the same directory as this jar package), OK!

You can do whatever you want, and you can simply perform the next step. But in this case, the external class library will be packaged into the executable jar package, and the executable jar package will be very large.

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.