I have the following problem, I am trying to access the images of my application from a jar file, the problem is that when I run the program (NOT the JAR file) only the .java file, access the images, but when I package the program in the .JAR and execute it, the images are not shown, we know that this is due, the images are in a folder that is inside the folder src
, the folder the name "imagenes"
and the classes are inside the main package within the same src
. I am using intellij IDEA.
Here is the code of how I have the routes:
guardar = new JMenuItem("Guardar", new ImageIcon("src/imagenes/save.png"));