Search code examples
javaswingembedded-resource

JAR file with picture


I made a small java program with a Frame showing a small ImageIcon. I'm using IntelliJ to make my programs. When I click on "Run", it shows me the Frame with the picture. Then I made a JAR file out of it, and now it just shows me the Frame but not the Image. What can I do?


Solution

  • You must add the picture to your resources folder, and insert it in your classpath!