0

so my projects have a lot of classpath variables set in the run configuration -> classpath tab in eclipse...

but once I exported the project as a runnable java jar file, none of these classpaths are exported to the jar's manifest file despite having specified this run configuration during the export dialogue....

how do I get eclipse to add these classpath variables to the exported jar's manifest?

besides doing everything manually of course...

kamikaze_pilot
  • 14,304
  • 35
  • 111
  • 171
  • http://download.oracle.com/javase/tutorial/deployment/jar/downman.htmlor http://www.rgagnon.com/javadetails/java-0587.html ? – darlinton Jul 17 '11 at 02:27

3 Answers3

1

You can create your own manifest file and ask eclipse to use it in the "Export->Jar" wizard.

You can also try "Export -> Runnable Jar" in the latest versions of eclipse. I have not tried it, this generally is supposed to include the referenced libraries, so it might include the classpath variables as well.

Nivas
  • 18,126
  • 4
  • 62
  • 76
0

Eclipse doesn't seem to have an option for creating a manifest, I think the export option is for library files rather than runnable jars. If I remember correctly you have to manually sign+add a manifest to a jar at once? Not sure though. But you would have to manually sign it anyway so not a massive deal.

Josh
  • 36
  • 3
0

Check out this post - i believe it answers your question.

Java: export to an .jar file in eclipse

Community
  • 1
  • 1
Dennis
  • 3,962
  • 7
  • 26
  • 44