Skip to main content

Rainbows All Over Your Blues

Posted by editor on November 21, 2007 at 8:18 AM PST


Java 6 for Mac, but not from Apple?

Coming out of all the anger and disappointment of Apple shipping Leopard without Java 6 were several cries of "maybe the open source community should just take over." This was an option on a poll we did on the topic, and 11.6% of respondents preferred the open source community over Apple and Sun as their Java providers.

Well, with an Apple-developed Java 6 still nowhere in sight, this group may just get its wish. Landon Fuller has spent the past couple weeks working on porting BSD's Java 6 to Mac OS X, and announced late Monday that he was ready to offer a Developer Preview 1 Release.

I'm pleased to announce the first Developer Preview Release of the open-source port of Java 6 to Mac OS X. This release includes support for 32-bit and 64-bit Intel machines running Mac OS X Leopard (10.5). (Nearly) everything up to and including Swing (X11) is functional. Sound is not currently supported. While I've spent some time testing this release with my own projects, this preview release should be considered beta quality. The project is very much in need of additional community testing -- If you're hankering for Java 6, please give this a try!

I almost put an OpenJDK icon on this story when I posted it to the Mac Java Community yesterday, and then I realized that the various BSDs' Java almost certainly isn't OpenJDK-based. For one thing, OpenJDK is working on Java 7, and also preparing a GPL back-port to JDK 6 of their work, whereas BSD's covers J2SE 1.2 to Java SE 6. So, I do kind of wonder what license is in effect for this port. Landon points out that to get the sources, you have to agree to the Java Research License, whereas FreeBSD's Java Downloads say, somewhat cryptically, "the FreeBSD Foundation has a license with Sun Microsystems to distribute FreeBSD binaries for the Java Runtime Environment (JRE) and Java Development Kit (JDK)", not addressing the issue of source or, for that matter, what's in the BSD-Sun license. Considering BSD's license was unilaterally revoked a few years back, I'd feel a little better knowing some of these answers before committing major projects to this lack-of-Java-6 workaround. And I bet someone's going to be able to follow up in the comments with the details I'm fishing for.

Still, legal concerns shouldn't diminish the technical achievement of getting the port substantially working in the course of a few evenings and weekends. A lot of Mac-based Java developers may potentially be unblocked by this, and assuming most are doing server-side development, the absence of native AWT support and sound is not that big a deal. And for those issues, it's likely some Cocoa and Core Audio developers may be able to lend a hand. Anyone care to whip up some suitable NSView implementations of com.apple.eawt.CocoaComponent?


Also in Java Today,
Neal Gafter has posted an update on his closures prototype for Java 7. "The Closures for Java prototype
now allows a closure to access mutated local variables from an
enclosing scope. You can download href="http://www.javac.info/closures.ztar">the prototype here.
You can also download the
sources for the rewritten parts of Doug Lea's fork-join library,
ported to use function types.
It is a good example of how APIs can
be affected by these language changes. Personally, I find the API
simplifications to be quite compelling." Neal is also working on smaller language changes, and describes the idea of "Extension Methods" in this blog as well.

The JavaFX Script Plugin for NetBeans IDE 6.0 is now open source. The source code is subject to the terms of the GNU General Public License Version 2 ("GPL") and the Common Development and Distribution License("CDDL") terms. The plugin includes features for the creation, modification, and execution of JavaFX Script applications. There are also future plans for additional features, such as debugging.


In today's Weblogs.
Terrence Barr goes all Romain Guy on the mobile GUI in
"Radical" SVG Makeover - Not your plain old Java ME app anymore
"What is really missing for developers is a step-by-step example on how to transform a plain old lcdui.*-based MIDP application into a flashy and engaging SVG/JSR-226-based app. So the idea of the "Radical SVG GUI Makeover" for Java ME was born."

Jan Haderka announces some nice new features in
SwingX 0.9.1 released.
"Apart from all the changes and bug fixes there are also new features delivered with this release -JXLoginPane now has support for CapsLock notification, JXHeader is more friendly and configurable, JXMultiSplitPane now paints dividers and many others. Make sure you check it out."

Finally, Arun Gupta shares feedback in
Metro and jMaki Q&A from a Preso.
"I presented on Metro and jMaki in an invitation-only gathering in Seattle on Nov 15. The audience in both the sessions was pretty interactive. Even though the sessions were invitation-only, I'm posting some of the questions asked during the sessions along with their answers"


In today's Forums,
Emmanuel Pietriga suspects a leak in
Garbage collecting a BufferedImage.
"I am having problems reclaiming memory consumed by a (supposedly GC'ed) BufferedImage. When I want to dispose of an image, I basically do: img.flush(); img = null; I was expecting this to free the memory from all resources associated with this BufferedImage. Unfortunately it does not seem to be the case. After some time I get a java.lang.OutOfMemoryError: Java heap space. Manual calls to System.gc() do not change anything to the current memory consumption."

rwillie6 has a roundabout solution to an authentication hassle in
Re: JDBC Realm login.
"It can be done transparently to the user, but ugly to the developer. If you've ever tried submitting a login request to j_security_check without first hitting a protected resource, you'll notice it doesn't work. But if you hit the protected resource, you can then submit a request to j_security_check from anywhere, without necessarily using a form on the page that the user would be directed to when hitting a protected resource without being first authenticated. I did it with javascript like this..."

emallin is looking for cross-platform screen-printing functionality in
Printing on MAC OSX - JDIC 20061102.
"Is it possible to print the screen when running JDIC on MAC OSX using build 20061102? Two methods that worked successfully on Windows are: 1. Calling the window.print() javascript, 2. Calling the print() method available in the JDIC WebBrowser API. On MAC, the javascript does not work and there is no print() method for the WebKitWebBrowser implementation for the MAC. Has anyone come across this issue and been able to resolve it?"


Current and upcoming Java
Events
:

Registered users can submit event listings for the href="http://www.java.net/events">java.net Events Page using our href="http://today.java.net/cs/user/create/e">events submission form.
All submissions go through an editorial review before being posted to the
site.


Archives and Subscriptions: This blog is delivered weekdays as
the Java
Today RSS feed
. Also, once this page is no longer featured as the
front page of java.net it will be
archived along with other past issues in the href="http://today.java.net/today/archive/">java.net Archive.

Java 6 for Mac, but not from Apple?