src/java.desktop/share/classes/java/awt/GraphicsEnvironment.java
Print this page
*** 95,109 ****
String nm = AccessController.doPrivileged(new GetPropertyAction("java.awt.graphicsenv", null));
try {
// long t0 = System.currentTimeMillis();
Class<?> geCls;
try {
! // First we try if the bootclassloader finds the requested
// class. This way we can avoid to run in a privileged block.
geCls = Class.forName(nm);
} catch (ClassNotFoundException ex) {
! // If the bootclassloader fails, we try again with the
// application classloader.
ClassLoader cl = ClassLoader.getSystemClassLoader();
geCls = Class.forName(nm, true, cl);
}
ge = (GraphicsEnvironment)geCls.newInstance();
--- 95,109 ----
String nm = AccessController.doPrivileged(new GetPropertyAction("java.awt.graphicsenv", null));
try {
// long t0 = System.currentTimeMillis();
Class<?> geCls;
try {
! // First we try if the bootstrap classloader finds the requested
// class. This way we can avoid to run in a privileged block.
geCls = Class.forName(nm);
} catch (ClassNotFoundException ex) {
! // If the bootstrap classloader fails, we try again with the
// application classloader.
ClassLoader cl = ClassLoader.getSystemClassLoader();
geCls = Class.forName(nm, true, cl);
}
ge = (GraphicsEnvironment)geCls.newInstance();