JDK-6503988 : Applets, applications with fonts/graphics won't run
  • Type: Bug
  • Status: Closed
  • Resolution: Fixed
  • Component: client-libs
  • Sub-Component: 2d
  • Priority: P4
  • Affected Version: 6,6u10,6u16
  • OS: windows_xp
  • CPU: x86
  • Submit Date: 2006-12-13
  • Updated Date: 2011-03-08
  • Resolved Date: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
JDK 7
7 b08Fixed
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
$java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
Just installed the release version of java 6. When trying to run the applet Java2Demo I get this in return:

$java -jar Java2Demo.jar
Exception in thread "main" java.lang.ExceptionInInitializerError
        at javax.swing.JMenuItem.updateUI(JMenuItem.java:232)
        at javax.swing.JMenuItem.init(JMenuItem.java:194)
        at javax.swing.JMenuItem.<init>(JMenuItem.java:133)
        at javax.swing.JCheckBoxMenuItem.<init>(JCheckBoxMenuItem.java:147)
        at javax.swing.JCheckBoxMenuItem.<init>(JCheckBoxMenuItem.java:105)
        at java2d.Java2Demo.<clinit>(Java2Demo.java:74)
Caused by: java.lang.IllegalArgumentException: 65 incompatible with Text-specific LCD contrast key
        at java.awt.RenderingHints.put(RenderingHints.java:1057)
        at sun.awt.windows.WDesktopProperties.getDesktopAAHints(WDesktopProperties.java:338)
        at sun.awt.windows.WToolkit.getDesktopAAHints(WToolkit.java:956)
        at sun.awt.SunToolkit.getDesktopFontHints(SunToolkit.java:1833)
        at sun.awt.windows.WDesktopProperties.setDesktopAAHints(WDesktopProperties.java:281)
        at sun.awt.windows.WToolkit.initializeDesktopProperties(WToolkit.java:944)
        at java.awt.Toolkit.getDesktopProperty(Toolkit.java:1734)
        at javax.swing.UIManager.<clinit>(UIManager.java:384)
        ... 6 more

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See description

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
stacktrace

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
look in de java2demo source
---------- END SOURCE ----------

Comments
EVALUATION Indeed I could find no way to set to this value except via manual hacking and running the windows cleartype tuner power toy as soon as you touch anything it forces it back to 1000. Any value lower than that is nonsensical. Still its easy for us to check for this in the code that retrieves the value and constrain to the legal range.
2006-12-13

EVALUATION This error is caused by unexpected value we are getting from the registry. While this is unlikely to be common problem (registry has to be edited manually) it has sense to make our code more robust. Submitter just confirmed that he had twicked registry manually: > The setting that I'm used to set relating to cleartype is > FontSmoothingGamma, which is a dword value that I set to decimal 650. I > like my fonts dark. This I set manually. Indeed, after removing this key, > rebooting, the Java2D app runs normally. > To try and see whether this has to do with the key just being there or the > value it has been set at, I tried setting the key with the Microsoft > powertoy "Cleartype Tuning". > http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx > With this tool I'm not able to set the value any lower than 1000, I > noticed, and with this value Java2Demo runs fine. Any value lower than > 1000 and I get the same exception I came across earlier.
2006-12-13