JDK-6260751 : Applets can't set sun.java2d.noddraw=true
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 1.4.2_08
  • Priority: P2
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2005-04-25
  • Updated: 2010-05-09
  • Resolved: 2005-07-18
Description
The customer is deploying a major product to their customers via Applets.  These customers are both internal and external to the Bank, and many do not have admin rights, or technical knowledge to configure Java through the Control Panel.

We've come up with a number of programmatic methods of solving the other performance and display bugs they've found so far, but one evades us.  The java2d performance issues that occur when Java2d mis-assesses the underlying hardware, and tries to use DirectDraw when it's not properly supported, leading to very poor paint performance.

It's understood that part of this mis-assessment can be due to the underlying drivers not being completely honest about what they support.  And testing such a fix before rolling out to customers would also be problematic.  So what is being requested here is a method by which an Applet can switch sun.java2d.noddraw to true programmatically, such as using System.setProperty("sun.java2d.noddraw","true"); in a Java application.  Right now this fails in an Applet - even though they use signed applets.  This property is set in a number of the demo applications we include with the JDK, to solve this problem.  Why is it not possible to do the same within applets?
###@###.### 2005-04-25 15:46:09 GMT

Comments
EVALUATION The sun.java2d.noddraw is a read once property variable for the plugin mechanism. Setting the variable after 2d initialisation has no affect. Java web start does support this variable on start up. A possible work around is for the applet to gain access to the $user.home\Application Data\Sun\Java\Deployment\deployment.properties file and append the following line : sun.java2d.noddraw=true The applet would then require a restart. ###@###.### 2005-06-03 14:14:16 GMT We cannot allow an unsigned applet a direct access to properties file on user's machine. Such applet has to be signed. Any signed applet can do such modification, and then user would have to restart the browser and reload the applet - as suggested above. After discussion with team, closing as "will not fix". ###@###.### 2005-07-18 19:32:05 GMT
03-06-2005

WORK AROUND The only workaround to this problem is setting sun.java2d.noddraw=true, and while that can be done in the Control Panel, that isn't acceptable in this environment. It needs to be setable programmatically, as it is in applications. ###@###.### 2005-04-25 15:46:09 GMT
25-04-2005