Is it possible to add files other than Java files, like .txt and .bmp/.jpeg files into a jar file, so that when run with java -jar jvapackage.jar it sees the txt/image files. It doesn't have to be able to add/edit any files already IN the archive.
Thanks in advance,
Joined: Mar 31, 2008
some more info:
I'm writing an Image Library where in I have several thousand images in folders and a few java classes do various things with the images. The images don't change and I want to jar them all together for portability.
Joined: Oct 13, 2005
Originally posted by Munaf Sheikh: Is it possible to add files other than Java files, like .txt and .bmp/.jpeg files into a jar file?
As far as I know, YES.
Have a look at This part of the Java Tutorials, particularly the bit about creating a .jar file. That appears to tell you how you can add pictures and text files to a jar.