Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: include source code while exporting as runnable jar

Tags:

eclipse

jar

I understand how to include other needed libraries or outside resources while creating a runnable .jar file in eclipse, but what I don't see is an option to also include the src .java files as well.

How could I accomplish this?

like image 342
thedan Avatar asked Sep 18 '12 19:09

thedan


People also ask

How do I export a runnable jar from Eclipse?

To export your project, right-click it and select Export. Select Java > Runnable JAR file as the export destination and click Next. On the next page, specify the name and path of the JAR file to create and select the Launch configuration that includes the project name and the name of the test class.


1 Answers

In the Export --> Jar File dialog you have the option to incluse source files and resources.

enter image description here

To make runnable a standard Jar File you only need to add/include an appropiate MANIFEST.MF on your own ...

like image 104
aleroot Avatar answered Oct 04 '22 17:10

aleroot