Forum Controls
Spotlight Features

The Rich Engineering Heritage Behind Dependency Injection

Andrew McVeigh takes us on a tour of the rich heritage behind dependency injection, what it represents, and tells us why its here to stay.

NetBeans 6: Matisse Updates

NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed.

Introduction to Groovy Part 3

In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.

Easier Custom Components with Swing Fuse

Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.

Benchmark Analysis: Guice vs Spring

Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.
Replies: 11 - Pages: 1  
Threads: [ Previous | Next ]
  Click to reply to this thread Reply

Interview: Porting Open Source Java to Leopard

URL: Open Source Java 6 on Leopard

At 1:09 AM on Nov 21, 2007, Geertjan wrote:

"I'm pleased to announce the first Developer Preview Release of the open-source port of Java 6 to Mac OS X," Landon Fuller wrote in his blog , two days ago. "This release includes support for 32-bit and 64-bit Intel machines running Mac OS X Leopard (10.5)." First, some background: Landon lives in the Cole Valley neighborhood of San Francisco. During the day, he runs the Infrastructure Department at Three Rings Design, a small games company. (A pic of him can be seen on the left.)

Landon, great work, you've got an early release out for open source Java 6 on Mac OS X Leopard! What's the story here? What moved you to do this?

Landon: Thanks! Honestly, I just wanted to run some software that required 1.6. Since I've long wondered what it would take to port the FreeBSD JDK to Mac OS X, it seemed like an opportune time to try. Additionally, this is the first step towards adding Mac OS X support to OpenJDK. It's my hope to see Java 7, via OpenJDK, available for Mac OS X at the same time as Solaris, Linux, and Windows.

What have been the trickiest parts of your port so far?

Landon: Getting the bugs worked out of Hotspot has been the most difficult task, by far. I've never worked with a complex JIT before, and I've found that runtime-generated code can be a whole new world of hard. The Hotspot engineers, and people like Gary Benson (OpenJDK PowerPC port), have my utmost respect.

There are also some standard APIs on Mac OS X that are incompatible with the BSDs and Linux in both interesting and unusual ways. Leopard's DTrace support has proven invaluable in tracking down bugs quickly.

What are you most proud of?

Landon: That the JVM runs! This has been an enormous learning experience in the guts of the Java runtime.

Sound seems to be missing. What else and why?

Landon: The most obvious missing feature is a native Swing UI, which is something I think is particularly important in the long-term. For now, I'm personally well-served by X11, and I hope that a native Swing implementation can be developed incrementally on top of a stable JVM.

Since I'm completely unfamiliar with Apple's CoreAudio API, I stubbed out sound so that I could get a JVM running. I'm hoping someone who has more CoreAudio experience can implement sound support—I don't expect this to be a huge task.

Lastly—and unfortunately—PowerPC support is not available, and adding it is an enormous task. I do hope to eventually include Gary Benson's OpenJDK PowerPC work.

Other than that, I don't expect there to be any significant missing functionality.

Are you working on this on your own?

Landon: I've been working on this on my own, with the intention of providing an initial release that would be genuinely useful to external developers.

I think that this "developer preview" release meets that goal, and I hope that intrepid developers will download the release, try it out, and report bugs. If they fix the bugs, that's even better!

What specific items could new contributors work on and how should they get started?

Landon: The best approach to getting started is to clone the mercurial development repository, build the JVM, and start using it for real work. You don't need to be an x86 assembly wizard—there's plenty of need for work in C, Java, and the build system.

  • Build system tasks:
    —Making sure that the JVM builds correctly in most environments.
    —Fixing dyld library paths at link time.
  • C tasks:
    —CoreAudio HAE sound implementation.
    —Support for Thread.setPriority() (via mach thread priority API)
  • Java tasks:
    —Run your code, see what breaks!

If you have a patch, send it along, and I'll integrate it into the central mercurial repository.

Do you have a timeline in mind?

Landon: While I am very interested in supporting Java 6 development, I find the long-term view far more captivating: I'd like to see Java 7—via OpenJDK—available on Mac OS X, and the BSDs, in concert with the Solaris, Windows, and Linux releases.

In the "who is to blame" debate in the "where is Java 6 on Mac OS X" discussion, have you formulated an opinion and would you care to share it?

Landon: Rather than blame, I believe that the clear solution is to allow the development community to maintain an open source implementation of Java for Mac OS X. If the BSD port is any indication, this is an achievable goal.

I would also love to see Apple donate their own code to the OpenJDK project.

You're making use of open source Java to port Java to Mac OS X. Do you see similar ports happening in the future or some other similar implementation?

Landon: Absolutely. The OpenJDK project has proposed the formation of the OpenJDK Porters Group, focusing on:

  • Ports to new architectures
  • Ports to new operating systems
  • Collaboration with other OpenJDK porting projects

I hope that this is only the beginning of community contributions to OpenJDK porting efforts.

1 . At 10:55 AM on Nov 21, 2007, Mike P wrote:
  Click to reply to this thread Reply

Re: Interview: Porting Open Source Java to Leopard

Hail Landon, and the other *nix porters! Filling the Java on Mac void is a great opportunity for lots of excitement.
This is kind of like blackdown Java again... Hopefully this time it'll stick.

This is the milestone that will salvage Java on the Mac, and it's probably the most fruitful result from Sun going open source.

I look forward to playing with it. I'll remove my MacBook's for-sale sign now...
2 . At 12:36 PM on Nov 21, 2007, roland.getty wrote:
  Click to reply to this thread Reply

Re: Interview: Porting Open Source Java to Leopard

Thanks Landon,

It clearly demonstrates that few (as low as 1) can achieve more then a whole team that mainly consists of marketing guys :)

I wonder if Sun or some of its employees are ready to comment on your work :)
3 . At 12:52 PM on Nov 21, 2007, Michael Baehr wrote:
  Click to reply to this thread Reply

Re: Interview: Porting Open Source Java to Leopard

It would be interesting to see if it works with SWT.

Then use SwingWT (http://swingwt.sourceforge.net/) and you should have a native looking free Swing implementation on OSX.
4 . At 1:20 PM on Nov 21, 2007, roland.getty wrote:
  Click to reply to this thread Reply

Re: Interview: Porting Open Source Java to Leopard

What's keeping you from using Qauqua?

http://www.randelshofer.ch/quaqua/download.html

it is licensed under the BSD. Would/could Apple sue people trying to integrate this into OpenJDK?
5 . At 1:26 PM on Nov 21, 2007, roland.getty wrote:
  Click to reply to this thread Reply

Re: Interview: Porting Open Source Java to Leopard

Another great thing is that OpenJDK7 for OSX would probably also run on earlier versions of OSX?

Or would I need to upgrade to Leopard? I am currently on Tiger and only upgraded so far to every new version of OSX because Apple only released the newest version of Java for the newest OSX.

It is really annoying that I have to pay so much every other year to upgrade to OSX while my old desktop is still running WinXP, Java6 which I got XP in 2001. Since then all updates free.

Something feels wrong when I just think about how much money I spend into OSX over the years just to develop Java on OSX. All the other features they include are useless for me or should be as part of a service fix.
6 . At 3:09 PM on Nov 22, 2007, Ivan Markov DeveloperZone Top 100 wrote:
  Click to reply to this thread Reply

Re: Interview: Porting Open Source Java to Leopard

> What's keeping you from using Qauqua?
>
> http://www.randelshofer.ch/quaqua/download.html
>
> it is licensed under the BSD. Would/could Apple sue
> people trying to integrate this into OpenJDK?

The second sentence on this page says:
"Quaqua is not a fully self-contained look and feel. It runs on top of Apple's Aqua Look and Feel, and provides fixes and enhancements for it."
7 . At 3:12 PM on Nov 22, 2007, Ivan Markov DeveloperZone Top 100 wrote:
  Click to reply to this thread Reply

Re: Interview: Porting Open Source Java to Leopard

I stand corrected.
The WebStart demo on Windows, even without "the native libraries", as they say, looks pretty functional!

This does not change the fact that the whole of AWT and Java2D needs to be rewritten with Cocoa peers though.
8 . At 1:35 PM on Nov 25, 2007, Mauricio Lopez wrote:
  Click to reply to this thread Reply

Re: Interview: Porting Open Source Java to Leopard

how would you expect that iphone jvm development get started. Would you suggest starting from scratch? Or using your code base and branch?
9 . At 2:13 AM on Nov 26, 2007, Werner Randelshofer wrote:
  Click to reply to this thread Reply

Re: Interview: Porting Open Source Java to Leopard

Hi Roland,

Up to yesterday, Quaqua did not work with SoyLatte due to dependencies to Apple's Macintosh Runtime for Java (MRJ).

The latest version runs now with SoyLatte. I think developers can experiment with it now. There is still a lot to do, to make Quaqua fully work without MRJ.

If Quaqua is going to be integrated into OpenJDK, it is important to restrict its usage to Mac OS X. Otherwise Quaqua would be in violation to copyright law.
I believe that Sun successfully prevented a lawsuit from Microsoft by restricting the WindowsLookAndFeel to the Windows OS.
Werner Randelshofer
10 . At 1:49 PM on Nov 26, 2007, roland.getty wrote:
  Click to reply to this thread Reply

Re: Interview: Porting Open Source Java to Leopard

Great work Werner!

It should be pretty easy to block uses for any other OS then OSX.

Take a look at JGoodies looks. I recently tried to activate their WindowsLookAndFeel for other OSs like Linux and OSX. It was just for fun so didnt dig deeper or looked at the source code.

However - the first check is does is looking for some System property. I believe it was "java.os" or "sun.os" or something. If thie isnt Windows it doesnt even try to set the WindowsLAF.

After changing this System prop to Windows under Linux/OSX , then setting the WindowsLAF and then changing back to the original property did work in the sense that it was tried to set the WinLAF. Still it crashed - so the security to not allow this LAF other then Windows seems at least less then trivial.

Perhaps you can learn something from looking at Karsten Letzsch's code?
11 . At 2:50 PM on Nov 26, 2007, Werner Randelshofer wrote:
  Click to reply to this thread Reply

Re: Interview: Porting Open Source Java to Leopard

Dear Roland,

Yes, I can indeed always learn a lot from Karten's excellent work on JGoodies Looks.

But I didn't mean that I didn't knew how to technically prevent usage of a look and feel. All that needs to be done, is to return false in method LookAndFeel.isSupportedLookAndFeel() for an unwanted platform.

Basically, I am just concerned about licensing issues.
Werner Randelshofer

thread.rss_message