chris
chris

Reputation: 437

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.

Upvotes: 2

Views: 5595

Answers (1)

Thomas
Thomas

Reputation: 5094

Using the normal export will generate a runnable jar as long as the manifest you give it specifies the Main-Class: configuration.

Upvotes: 3

Related Questions