My Oracle Support Banner

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

Last updated on NOVEMBER 14, 2020

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

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.