Two ways to package Eclipse into a jar file_eclipse package Android add version number_CharliChen’s blog

Two ways to package Eclipse into a jar file_eclipse package Android add version number_CharliChen’s blog

This article is reproduced : http://www.cnblogs.com/lanxuezaipiao/p/3291641.html Option 1: Use the Export function that comes with Eclipse Step 1: Prepare the main manifest file “MANIFEST.MF”, Because it is a Java project that packages and references a third-party jar package, it needs to customize the configuration file MANIFEST.MF, and create a file MANIFEST.MF under this project, the content is as follows: Manifest-Version: 1.0 Class-Path: lib/commons-codec.jar lib/commons-httpclient-3.1.jar lib/commons-logging-1.1.jar lib/log4j-1.2.16.jar lib/jackson-all-1.8.5.jar Main-Class: main.KillCheatFans The first line is the version of MAINIFEST, the second line Class-Path specifies the location of the foreign jar package, and the third line specifies the MAIN java file we want to execute. A few points to note here: 1, Class-Path: and Main -Class: There is a space after it, which must be added, otherwise the packaging will fail, and the error message is: Invalid header field; 2. Assuming that our project is packaged as KillCheatFans.jar, then according to the above definition, a lib folder should be created in the same directory as KillCheatFans.jar (that is, the lib file and the packaged jar file in the same directory), and put the relevant jar package inside. Otherwise, an error of “Exception in thread “main” java.lang.NoClassDefFoundError” will appear; 3. Main-Class is followed by…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索