An ultra-easy way for Eclipse to package third-party jars

Source: Internet
Author: User

Original address

Http://wenku.baidu.com/link?url= 0kcbuc-7g4pggxurba2jdcrkrsqmqzadggt59tyecaundf8c6r9yxy4eabn3l8ciywz5jwqk9tfaay8miogiie5-ft_rs1i8ipddu17elss

Briefly:

With Eclipse's export function, choose Export as Jar file, then choose as usual, after generating the jar files, open with other compression software such as WinRAR, and then do the following

1. Find a place to create a Lib folder, and put the third-party jar package you want to use in this folder

2. Compress the Lib folder into the root directory of the jar you want to generate with the compression software.

3. Use the compression software to open the Meta-inf folder inside the jar you want to generate, MANIFEST.MF, open with Notepad, and then see something like this.

1.0 Main-class:main

Insert a row inside

Class-path:lib/jcommon-1.0.23.jar Lib/jfreechart-1.0.19.jar

Note that to be specific to a single file, and with multiple jar packages, separate the jar packages with a space

After completion:

1.0 Class-path:lib/jcommon-1.0. . Jar lib/jfreechart-1.0.  + . Jarmain-class:control. Main

and then save.

OK, and then run the jar directly to use the third-party jar.

An ultra-easy way for Eclipse to package third-party jars

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.