java.lang.ClassCastException: sun.java2d.HeadlessGraphicsEnvironment cannot be cast to sun.awt.Win32GraphicsEnvironment (Doc ID 1667732.1)

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)

Symptoms

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.

  

Changes

n/a

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms