Lucas Smith wrote:I want to create the JAR file from Eclipse IDE. That's rather easy -> Create Runnable JAR. BUT, I want to add .JPG file, other .JAR files and .DLL files to that final JAR. Moreover I have to set some arguments for the JVM.
Do you have any ideas?
A jar file is just a zip file, and can hold anything -- jpg files, other jar files, DLLs, etc. However, while
java does allow you to access the files in a jar file, it doesn't allow you to use it like any other file in the file system. So, one option is to create an installer class. The class will check the file system for the files you need, and if not available, extract it from the jar file to the file system. Basically use the jar file only for packaging -- and have it extract at run time.
As for your second question, you can use a configuration file -- and extract it the same way as your first question.
Henry