Problem: JAR file created cannot display image file alone
I am writing java program under Windows platform.
And the image file is kept in the file folder "image".
The developed program is then packed into the JAR file format using the command: "jar cvf0 MyJavaProgram.jar MyJavaProgram.class image". And I double checked that the image file is inside via : "jar tf MyJavaProgram.jar" and this command displayed the contents of the JAR file to stdout:
My problem is as follows;
When I copy the JAR file to another PC, it cannnot display the image of "MyImage.gif" unless the file folder "image" (which contains the file "MyImage.gif") is also copied to the PC.
Kindly advice what I need to do such that the JAR file created can run standalone without the need to copy the entire image folder over to the PC?