-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
beta
-
sparc
-
solaris_7
Name: sdR10048 Date: 01/22/2001
static initialization of java.awt.SystemColor throws unexpected
HeadlessException in headless mode.
Javadoc (jdk1.4 beta 46) says nothing about HeadlessException.
See example:
--------------------------------------------------
dsv@falcon ~/tmp
% cat Test.java
import java.awt.*;
public class Test {
public static void main(String[] args) {
try {
System.out.println( SystemColor.desktop );
} catch (Exception e) {
e.printStackTrace();
}
}
}
dsv@falcon ~/tmp
% javac Test.java
dsv@falcon ~/tmp
% j -Djava.awt.headless=true Test
Exception in thread "main" java.lang.ExceptionInInitializerError
at Test.main(Test.java:5)
Caused by: java.awt.HeadlessException
at sun.awt.HeadlessToolkit.loadSystemColors(HeadlessToolkit.java:177)
at java.awt.SystemColor.updateSystemColors(SystemColor.java:342)
at java.awt.SystemColor.<clinit>(SystemColor.java:335)
... 1 more
^C
dsv@falcon ~/tmp
% java -version
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b46)
Java HotSpot(TM) Client VM (build 1.4beta-B45, mixed mode)
--------------------------------------------------
This causes to fail folowing jck merlin test:
api/java_awt/SystemColor/index.html#SystemColor
======================================================================