question about creating jar executables. Suppose we have a jar file a.jar containing UI.class. I used the metafile in a.jar archiving that says
Main-Class: UI Class-Path: . b.jar c.jar
Now, if I want to send this a.jar executable to someone, I have to send 3 files - a.jar, b.jar and c.jar. The user must put all 3 in the same folder, and then double-clicking on a.jar will work. It would be easier if I could send one file (a.jar), and the JVM could figure out how to extract b.jar and c.jar from it in order to use classes. These 2 are external libraries, and I do not want to expand them and re-place class files in a.jar.
Can this be done? If so, what is the jar command and what should be done in the metafile? Currently team
jar cmf metafile a.jar UI.class
Thanks.
source share