0

The title basically says it; I want to export a jar file from Eclipse with all the referenced libraries. I have tried to export it as a runnable jar as well, but it does not have a main method so I'm guessing this won't work?

mrlarssen
  • 325
  • 8
  • 19

2 Answers2

2

Goto File -> Export -> Java -> Jar. Select it to pack all of the referenced libraries.

TameHog
  • 950
  • 11
  • 23
  • I can not see this option in eclipse kepler. Dan you show a screenshot? – Jens Apr 24 '15 at 11:33
  • 2
    The options I have are: `Export generate class files and resources` `Export all output folders for checked projects` `Export Java source files and resources` `Export refactorings for checked projects` I have checked all of them in different combinations and I get the same result. If I run `jar -tf ` should the referenced libraries be listed? Or is this not the way to find out? – mrlarssen Apr 24 '15 at 11:40
1

I would post this as a comment, but my reputation does not allow.

Can you not just add a blank main method?

Socratic Phoenix
  • 556
  • 1
  • 7
  • 19