Java Application Bundles?

Felipe Gaucho brings up an interesting point on his Java.net post about being able to package all of your applications dependencies within a single JAR file. I have often wondered how you might be able to do something like this on the desktop. On the server side, you can place all of your dependencies into a single WAR or EAR file. On the client side you have to manage everything yourself, and depending on who is managing it, the results can be less than stellar. Personally, I’d like to see something like Apple’s application bundles in a future JDK. This could enable you to create a double-clickable application, which works across all Java SE enabled platforms, complete with all of your JAR and resources all in one simple file.

Sure, JARs can be double-clickable now and you can tweak the manifest file so that it can locate dependent JARs. But when an end user is confronted with directory full of JAR files, it is not readily apparent which JAR is the one that actually kicks off the main() method. Sure, it’s obvious to any Java geek, but what about the less technically-inclined? It’s time something better was done.

4 thoughts on “Java Application Bundles?

  1. Try fatjar (eclipse plugin and ant task) to create flattened jar with application (one file). You can also use classloader (called OneJar) which is bundled with fatjar to access other jar files within your application jar file (but in most cases you can just flatten all jars to one and feel good with it ;-)).

    Of course having that functionality built in core jdk would be very nice.

    Like

  2. Try fatjar (eclipse plugin and ant task) to create flattened jar with application (one file). You can also use classloader (called OneJar) which is bundled with fatjar to access other jar files within your application jar file (but in most cases you can just flatten all jars to one and feel good with it ;-)).

    Of course having that functionality built in core jdk would be very nice.

    Like

Comments are closed.