I have a small program that does some FTP work with the help of Apache's commons-net-1.2.2.jar file and so every time I execute the Java program, I have to use the classpath flag to reference that JAR file. I would like to package up my Java program into an executable JAR file, and if possible, I'd like to include the Commons Net JAR file inside of my "main" JAR file so that there would be only one simple thing to call to run it (because I would like to hand this off to less-savvy colleagues who need to use it to automate some tasks). Is there any way to do this? If so, how do you make sure that the classes in the JAR file know how to find the classes in the other JAR file? Thanks...
As far as I can tell, that doesn't work for "nested" jar files, though, sorry...
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Thanks for all the replies. I'm trying to just JAR up my program and include the classpath to the other JAR file in the manifest so that all someone has to do is drop both of them into the same directory. However, I'm running into this problem:
C:\code\uploadsdownloads>java -jar UploadsDownloads.jar Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPConnectionClosedException
The commons-net-1.2.2.jar containing all that FTP code is in the same directory as the JAR I'm trying to run, and the manifest looks like this: