Hello
I'm making a program and I want to put the program in a JAR-file. But when I put it in one, the images aren't found. I did try many things, such as the getClass().getSourceAsStream(Filename), but no one works. Can anyone help me, please?
this is the code(I show one example, the others are similar):
The main-class App.class calls a method in the class Image
This is the file-content:HTML Code:saveIcon = new ImageIcon((Image)ImageIO.read(new BufferedInputStream(this.getClass().getResourceAsStream("/save.png"))));
App.jar
App.class
Image.class
save.png
Thanks in advance
Grimling




Reply With Quote