Hey guys,
I'm working with a Java Applet which has a TON of dependencies in the form of open or closed-source .jars. I thought the point of the .jar file (according to Sun) is to limit the number of required http connections to receive the applet to exactly one?
Well, now I'm almost as bad as a simpler program that distributes itself as .class and resource files! It'd take about 20 http connections to receive the applet's dependencies; but the answer to this solution will allow me to distribute it as one file! The difference in download time from 20 individual http connections, versus a single connection to download all the material, is about twice as slow (because each jar is very small, less than a second DL, if you've got broadband).
I also plan to distribute my program as a standalone Java Application for the desktop, and I want to minimize the number of files that can be corrupted / moved by the user.
A different EE solution suggested that I "unjar" all of the dependency JARs, and include them in my own. However, when I tried doing this, I got all sorts of errors, and "Organize Imports" didn't find any of the classes I included in my base project folder, even though I included them in their correct package directories :-( Using the Eclipse IDE, is there any sort of Eclipse or Ant plugin that I can load which will do this automatically at build time? It would also greatly decrease the complexity of my class browsing tree if I am able to do this only at JAR build-time; while I'm using the IDE I would see my dependencies as singular .jar files, not 65+ package directories.
So, what I have already tried (detailed below) is not valid as an answer:
1. Extract all files from all dependency JARs, preserving the folder structure inside of the JAR.
2. In Eclipse, right-click on the base Project (not a package) and do Import... and import all the dependent folders, .class files, and resources into the base output folder.
3. Build Clean the project, Organize Imports again, Save All, etc.
If you can tell me what I did incorrectly in those three steps, or provide a link to a plugin that will tackle this problem for me at build time, you deserve 500 points! Also - if your offered solution has poor documentation, I would appreciate a quick how-to on usage (I'd give bonus points for that if EE allowed me!)
Thanks,
Sean