简体   繁体   中英

Eclipse: Create Runnable .jar WITH manifest possible?

Eclipse allows you to build a runnable .jar, but does not allow you to specify a manifest.mf.

Alternatively, you can create a .jar, and specify a manifest, but it will not be runnable.

How do I build a runnable .jar WITH a manifest. I want to do this so I can have a splash screen.

Edit: The Eclipse jar export options are limited. The real problem I was having was the exported jar, while it specified Main-Class, did not include libraries. To export a jar with a manifest AND libraries, install the Fatjar plugin. http://fjep.sourceforge.net/

Eclipse's built-in "runnable jar export" will include libraries, but not allow one to specify the manifest. And the "export jar" allows one to specify a manifest, but will not package libraries into the jar. Fatjar allows you to do both.

只要您提供的清单指定Main-Class:配置,使用正常导出将生成一个可运行的jar。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM