Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export a Java project without main method (with external jars) to Jar in Eclipse

Tags:

java

eclipse

jar

I have created a java project which only handles post and get request from a web api. I need to export it as jar file. The issue is I'm using external jar files such as httpcore-4.3.3.jar and gson-2.3.1.jar. I have seen many solution to export as runnable jar, Since I don't have any main method how can I export my utility java project to jar file.

My issue is I'm unable to export my project which has no main method as JAR along with my library files in eclipse.

Thanks in Advance

Edit Update:1

Screenshot

like image 562
Femil Shajin Avatar asked Nov 01 '22 05:11

Femil Shajin


1 Answers

Used Fat Jar to export My Java project as JAR along with my referenced libraries.

like image 113
Femil Shajin Avatar answered Nov 09 '22 06:11

Femil Shajin