Share via


The word is - "Java on Vista: Yes, it Works"

Some folks have noticed that when they run Java applets in the browser, that Aero and desktop composition would get disabled.  This was due to Java locking the primary buffer, and when that happens, the DWM no longer has access to the resources needed to draw the desktop, therefore we disable desktop composition.  Sun has since addressed this issue, as you can see in this post in Chet Haase's blog.  Chet also provides lots more detail about what was up, what version it's fixed in, and when it will be available - or, as BubbleMan insists on saying, availabubble.

 And while we're on the topic, earlier versions of Apple's QuickTime/iTunes also exhibited this primary-locking behavior.  The lastest updates to QuickTime/iTunes no longer does this.

Comments

  • Anonymous
    October 10, 2006
    This has been addressed since Beta 2... or at least RC1.  Installing the latest nightly build of JRE6 would work on Vista. I know it was before a formal beta came out for JRE6.

  • Anonymous
    October 16, 2006
    Ohh, very interesting.  Maybe this is why Java tended to absolutely DESTROY the performance of any 3D app running in a window, and had the power to make my ATI driver BSOD.  Why couldn't they just draw to the screen without locking the primary buffer, like a well-behaved app?

  • Anonymous
    October 17, 2006
    Tom: We don't draw using the lock; the lock was used as (a) a sanity-check for DirectDraw (old driver/runtime issues), (b) historical code that did occasionally lock/write/unlock, (c) flushing the GPU command queue (locking the screen tends to be the most expedient way to do this).  We found workarounds for all of these, thus the locks could be removed.  Note that Swing (Java's GUI toolkit) is double-buffered, so drawing directly to the screen is not possible.  Instead, we draw to the Swing back buffer and use DirectX to Blt the contents to the screen.  As for the BSOD problem on ATI, there was an issue way back in earlier release of 1.4.0 and 1.4.1 where we triggered an ATI driver bug; we would create more d3d contexts than the driver could handle (8) and BAM!  Later versions of Java (updates of those earlier releases as well as all version sof 1.4.2, 5.0, and SE 6) do not have this issue.  ATI also fixed their drivers since then.  I am not aware of other BSOD issues (with ATI or any other boards).

  • Anonymous
    October 18, 2006
    Chet - thanks so much for the details, and I apologize for the flame.  The BSOD occurred while I was in the Java control panel applet trying to turn off auto updates after having just installed the latest version, so it was particularly frustrating.  (I see that the Java control panel applet appears completely differently nowadays, with the look and feel of a native Windows app.)  It's great to hear that these issues were recognized and addressed!  I stand in awe of the utility of the blog.