1

I am building a java desktop application in Eclipse . And i need to either export it as a JAR and run through command prompt or export as an Executable JAR.

The project structure is

 -- src
 -- resources
 -- bin
 -- build
 -- Icon
 -- build

And after exporting it , when i try to run the jar file , the icons are not getting loaded in the interface .

Please help me out in this regard .

Achilles
  • 1,065
  • 2
  • 13
  • 29
  • similar question: http://stackoverflow.com/questions/423938/java-export-to-an-jar-file-in-eclipse – shift66 Jan 11 '12 at 06:49

1 Answers1

1

If you put the images in a resource folder instead of a normal folder, they will export.

Make a new resource folder by rightclicking your project, new, Resource Folder. Add the path you want (like 'src/java/resources') and put the images in there.

(at least, this did it for me.)

Lolmewn
  • 1,491
  • 4
  • 17
  • 38