Update: 04 November 2012 - The OpenJDK macosx-port has vastly improved in the last few months and all my patches have been accepted so I no longer recommend this fork.
At my current job I'm tasked with bringing a Java Swing application to the App Store.
The way to do it, on OSX, is to bundle a Java distribution within the application as by Apple's terms it is no longer possible to distribute applications that rely on technologies optionally installed. As such, I started looking how to bundle the OpenJDK inside an OSX application.
It turns out AppBundler does exactly that. So, task finished ? no, not quite...In the process of testing and improving our application I discovered several bugs in the OpenJDK and after a few patches we finally decided to maintain our own branch.
Our OpenJDK fork currently provides:
- Support for the property apple.awt.fileDialogForDirectories.
- Support for opening applications by double-clicking on a file. Current OpenJDK behaviour is a hard crash...
- Fix a problem where the native save dialog doesn't save the extension of the file saved.
- Fix the JMenuItem not showing accelerators keys.
- Add universal binary (i386/x86_64) support.
- Shows the actual symbol keys for most of the symbols in the JMenuItem accelerators. Eg. shows Ctrl+[ instead of Ctrl+Open Bracket.
I hear you say, why forking instead of contributing back the changes ?
I did contribute one patch, but my other contributions weren't accepted for several reasons. apple.awt.fileDialogForDirectories is not going to be supported, so there's no interest in adding it. The univesal build change touches the whole OpenJDK not only the jdk repository, it's been contributed originally by somebody else and it is still currently been discussed. Regarding the JMenuItem fix, the real cause of the problem is still unknown, although my change still fixes the problem and correct an existing error. In general, it is a bit difficult to match our need to move quickly and our interests with the slow process of contributing an official patch and the long-term plans at Oracle.
In addition to the OpenJDK fork, I also forked AppBundler, reason being, my perceived lack of interest in this project at Oracle (although I did submit patches that have been accepted).
Our AppBundler fork features:
If you're a Java developer trying to bring your app to the Mac App Store, go ahead and download our stable jdk and AppBundler forks. For a slightly more experimental code, feel free to clone my jdk and my AppBundler repos on BitBucket.