Last updated on JULY 07, 2017
Applies to:Java SE JDK and JRE - Version 6 to 6 [Release 6]
Microsoft Windows x64 (64-bit)
Microsoft Windows (32-bit)
You see a "java.lang.ClassCastException: sun.java2d.HeadlessGraphicsEnvironment cannot be cast to sun.awt.Win32GraphicsEnvironment" exception in the logs. In the sample stack trace below, the important string is printed in bold. The stack trace is from Java SE 6 update 30. If you have a different Java release, the line numbers may be different.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms