Java: export to an .jar file in eclipse

Adis picture Adis · Jan 8, 2009 · Viewed 206.4k times · Source

I'm trying to export a program in Eclipse to a jar file.

In my project I have added some pictures and PDF:s. When I'm exporting to jar file, it seems that only the main has been compiled and exported.

My will is to export everything to a jar file if it's possible, because then I want to convert it to an extraditable file, like .exe-file.

But how?

Answer

Yuval Adam picture Yuval Adam · Jan 8, 2009

No need for external plugins. In the Export JAR dialog, make sure you select all the necessary resources you want to export. By default, there should be no problem exporting other resource files as well (pictures, configuration files, etc...), see screenshot below. JAR Export Dialog