thedan
thedan

Reputation: 1240

Eclipse: include source code while exporting as runnable 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?

Upvotes: 9

Views: 14744

Answers (3)

Anly
Anly

Reputation: 309

I know this is answer is very late, but for those who still read this:

Eclipse has this option. You probably just did not notice it. I haven't checked since what version, Eclipse Luna has it for sure.

  • Export --> Jar File
  • then do not click Finish, but click Next.
  • You have more options there.
  • You will probably have to click Next twice to get to the Main Class selection.

Upvotes: 0

Hanumanth
Hanumanth

Reputation: 1247

Export to Runnable jar. Open the Runnable Jar with WinRAR. Click Add button, select the src.zip file.

Upvotes: 2

aleroot
aleroot

Reputation: 72676

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 ...

Upvotes: 7

Related Questions