App bundler project now open

30 03 2012

We’ve started a new project on Java.net to support creating bundled applications from your Java JARs and other resources. Find it here on java.net. It’s pretty small right now, as we are starting with Mac OS X, but we plan to expand to other platforms as well, and support JavaFx’s packaging and launching tools too.

Why isn’t this part of OpenJDK? Well, mainly because this project isn’t really tied to a specific JDK version. We will establish Java 7 as the base supported version, but expect it to work with little or no modification on Java 8 and 9.

There is some code for Mac OS X launchers in OpenJDK, but we will be moving that code to this project and removing it from the tree.

About these ads

Actions

Information

9 responses

30 03 2012
Josh Marinacci

Hi Scott. I started another project (also called App Bundler) which has an Ant task to turn a simple XML description into a Mac .app, Windows EXE, JNLP, or double clickable jar.

http://joshondesign.com/2012/02/26/AppBundler_new_project

If you are going to be going ahead full steam on this project I’d like to donate my code and / or help out. This is something we’ve needed for a *long* time. We especially need the ability to embed a JRE & JavaFX

30 03 2012
Scott K.

Josh, thanks for the offer! We’d love to have it. I now recall that Chuq tweeted about this some time ago, but I forgot about it. The Windows .exe builder, in particular, will be a great addition. I’ll email you and Greg Brown by this Monday and we can start figuring out how to put everything together.

2 04 2012
Emmanuel Bourg

You might also want to take a look at the JarBundler Ant tasks for OS X packaging:

http://informagen.com/JarBundler

Regarding Linux there are existing projects for packaging Java applications as Debian and RPM packages:

JDeb
https://github.com/tcurdt/jdeb

Redline RPM
http://redline-rpm.org

5 04 2012
Scott K.

Thanks for the links. I have next to no experience with Linux, so these are very helpful.

2 04 2012
Fernando

“into a Mac .app, Windows EXE, JNLP, or double clickable jar.”

Why do people insist on negating the best virtue of Java which is creating a SINGLE EXECUTABLE (.jar) that can be run anywhere? Why do insist on offering versions for each OS out there with native launches, when in any case it´s the job of the OS to associate .jar files with “Java -jar” ??

Also, I guess the creators of this project haven´t heard of One-Jar? It´s been around for ages, it´s open source, and it works.

http://one-jar.sourceforge.net/

FC

2 04 2012
Josh Marinacci

I have heard of One-Jar. I used it as the inspiration for this feature. However, most *users* want native exes. They don’t know or care what language the app is written in, they just want it to work like their other apps. Distributing apps simply as jar files means they don’t get icons, they dont’ show up in the task manager correctly, they can’t invoke native features, etc. They are no better than shell scripts. Some times they are very useful, which is why I support them in App Bundler, but they are not replacement for native exes.

3 04 2012
tbeernot

Like Josh I’ve also created my own implementation of One-Jar, I named it AppJar. Basically it is a jar with all the required stuff inside and bootstrap code to unpack and kick off a new JVM. The initial JVM then becomes a monitoring JVM which could do things like heartbeat checking.

This approach is different from One-Jar in that it does not use a special classloader, this was causing me problems and was the reason I wrote AppJar.

I generate a jar, but it should be quite trivial to wrap that in a EXE.

If you guys want, I can also contribute my code and possibly participate (all though the amount I can is very restricted).

3 04 2012
kevinkrouse

No love for JDK6?

5 04 2012
Scott K.

Sorry, no. JDK 6 on Mac OS X is deprecated, which is Apple-speak for ‘going away within the next year or two.’ And you can’t bundle the Java 6 JDK on Mac, either.




Follow

Get every new post delivered to your Inbox.

%d bloggers like this: