2017.5.1 using the Fat jar plug-in to package a project that references an external jar package

Source: Internet
Author: User

If the API, jar package, or other ancillary resources provided by a third party are used in the development of the program. When you export and build your project's jar file, you must export the files of the third party, or it will not run correctly.

You can use the Fat jar plugin: http://sourceforge.net/projects/fjep/

1. Download

After the download is complete, unzip to the folder, structure

2. Installation

(1) Restart Eclipse by placing the jar package under plugin under Eclipse plugin.

(2) After reboot, windows->preferences, if there is a fat jar, indicates the installation is successful.

(3) If the fat jar is not seen in the preferences after reboot, go to configuration->org.eclipse.update in the Eclipse directory and delete the Platform.xml file. Then restart Eclipse.

After completing this step, Redo (2).

3. Use

Right-click the project and select Build Fat jar. Fill in the Jar name, select the main class of the project, and finally tick the resources you want to attach. Click Finish to complete the package.

4. Run the jar package

Open a Command window and enter the path of the jar package that you just packaged, enter:

Java-jar ***.jar

2017.5.1 using the Fat jar plug-in to package a project that references an external jar package

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.