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?
Asked
Active
Viewed 3,678 times
0
-
possible duplicate of [How to create a jar with external libraries included in eclipse?](http://stackoverflow.com/questions/11033603/how-to-create-a-jar-with-external-libraries-included-in-eclipse) – Federico klez Culloca Apr 24 '15 at 11:29
-
that one is about exporting a runnable jar. Mine does not have main method and therefore I cannot export it as a runnable jar. – mrlarssen Apr 24 '15 at 11:31
-
@mrlarseen, ok, I retracted my vote – Federico klez Culloca Apr 24 '15 at 11:34
2 Answers
2
Goto File -> Export -> Java -> Jar. Select it to pack all of the referenced libraries.

TameHog
- 950
- 11
- 23
-
-
2The 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