I have problem in my program (JAVA) that I have configured my code with some Images and Text file paths . I want to create its "Runnable Jar File" I have created one but the PATH is not independent like if I move it to other computer then it will not run cause of the file path I gave it to does not EXIST ... IS THERE ANY WAY TO READ THE FILE PERMANENTLY FROM RUNNABLE JAR ?
some code is
My Package is created like this
try {
icon = new ImageIcon(ImageIO.read(ResourceLoader.class.getResourceAsStream("/resources/12.jpg")));
tree = new ImageIcon(ImageIO.read(ResourceLoader.class.getResourceAsStream("/resources/back.jpg")));
vector = new ImageIcon(ImageIO.read(ResourceLoader.class.getResourceAsStream("/resources/line.PNG")));
} catch(Exception e){
e.printStackTrace();
}
After Creating Runnable Jar File I am facing Error After Launching JAR file with cmd ,Explorer look like this