ImageIcon lost after creating a runnable JAR file
问题 The project runs fine when I click play in Eclipse but after I created the runnable JAR file , The ImageIcon for the button is gone. The images are stored within the src folder, uder a subfolder images. I created the image icon as Icon playIcon = (Icon) new ImageIcon("src/images/play.png"); Although I am using a relative path, the button does not display images, How do I get the images even in the JAR file? Update after Nikolay Kuznetsov's answer I ended up creating a very unstructured