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