Name: atR10251 Date: 04/06/2004
The problem comes up when System.getenv() is called from an applet inside Netscape 4.x on Solaris.
Run this applet to reproduce it:
-----------------------------------
import java.applet.Applet;
public class MyApp extends Applet {
public void start() {
System.getenv("DISPLAY");
}
}
-----------------------------------
The following exception will be thrown:
java.lang.ExceptionInInitializerError
at java.lang.System.getenv(System.java:795)
at MyApp.start(MyApp.java:5)
at sun.applet.AppletPanel.run(AppletPanel.java:394)
at java.lang.Thread.run(Thread.java:570)
Caused by: java.lang.NullPointerException
at java.lang.String.<init>(String.java:486)
at java.lang.ProcessEnvironment$Variable.valueOf(ProcessEnvironment.java:157)
at java.lang.ProcessEnvironment.<clinit>(ProcessEnvironment.java:58)
... 4 more
Despite the fact that this method is deprecated we use it in AWT code because of the absence
of any alternative. You may look at the bug 4979996 to see this necessity.
Regarding this problem, we found a workaround so that we avoid calling System.getenv() in applets,
but still need it in applications.
So, I file this bug just to show the problem.
======================================================================