The Source for Java Technology Collaboration
User: Password:



Fabrizio Giudici

Fabrizio Giudici's Blog

Leopard changed the Java2D pipeline of Java 5 (and other Leopard+Java updates)

Posted by fabriziogiudici on October 30, 2007 at 04:30 AM | Comments (6)

Apart from specific SWT-AWT stuff that is related to Eclipse, one of the most common things that could happen are differences in font rendering (antialiasing) and speed changes in Java2D stuff, imaging included.

That's because the JDK 5 with Leopard doesn't use any longer the Quartz pipeline by default, but the Sun one. What's a "pipeline"? In a few, incomplete words, it's the way Java2D is implemented natively. There's a Sun default pipeline, an OpenGL pipeline - only on Sun VMs - and a Quartz pipeline - only on Mac OS X. A few months ago I blogged a bit about the possibly huge performance differences with imaging operations and different pipelines.

The easiest why to restore things as they were is to add this option to your application:

-Dapple.awt.graphics.UseQuartz=true

I didn't have time to test it yet, I'll do in a few days. In the meantime, let us know if this solves the problem. BTW, Apple hadn't published the Release Notes about JDK 5 (or Leopard itself), but they say they'll be doing it soon.

PS The Java blogsphere is full of angry people, but somebody is asking for calming down, basing on the fact that Apple historically released JVM major updates by not bundling them in the newest Mac OS X, but as a separate download (as this practical diagram by Eric Burke describes). So, it might be a matter of days or weeks. I know and in my previous post, indeed, I said I'd wait for a few days.

But this is not the point. I'm amazed as people miss this point so easily. Should we make our decisions / advicing / consulting about inducing from the past that maybe Apple will release Java 6 shortly? My belly says it's highly likely to, but induction is not guaranteed to always work.


Technorati Tags: , , ,


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first)

  • We shouldn't be tricked by Apple's historical behaviour. There is zero evidence Apple will release Java 6 *at all*.

    It's time for the Apple Java devs to either lobby Sun to write its own JDK for OS X, or port OpenJDK themselves.

    Posted by: wordwarrior on October 30, 2007 at 06:16 PM

  • Apple has just published the Release Notes for Java 5 on Leopard:

    http://developer.apple.com/releasenotes/Java/JavaLeopardRN/index.html

    Posted by: fabriziogiudici on October 30, 2007 at 11:52 PM

  • Re-enabling Quartz did solve the Java2D problems I was having. Thanks.

    Posted by: mikeurban on October 31, 2007 at 08:04 AM

  • It's almost as though, post-open sourcing Java, Apple has decided to let the community do the work of porting Java. It would be "nice" if they'd at least provide some kind of a definitive statement as to whether that's the case or not. Leaving developers in the dark never helps OS vendors; it only provides room for rumors and speculation.

    Posted by: spetkar on October 31, 2007 at 09:35 AM

  • I am trying to use a Java application in Leopard that runs fine in Tiger. In Leopard, the virtual memory used (according to Activity Monitor, I don't know how accurate that is) is twice that of Tiger. The app is a Swing app, using font antialiasing and other painting tricks. I tried enabling Quartz as you mentioned above, but it did not help. Any ideas or should I wait for Apple to update the OS in 2-3 weeks?

    Posted by: ahlderaan on October 31, 2007 at 11:12 AM

  • @ahlderaan, I really don't know. I suggest you to ask for advice to the java-dev mailing list at Apple.

    Posted by: fabriziogiudici on October 31, 2007 at 01:24 PM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds