Class.forName is sufficient since the GE is part of the
implementation, not an end-user definable interface.

So long as that is clear, I can't think of any problem the proposed
change would cause the JDK.

-phil.


Roman Kennke wrote:
Hi there,

I'm playing around with Cacio again, and I'd like to load an external GE
(and Toolkit) from the standard classpath. But it turns out to be
impossible, because GE.getLocalGraphicsEnvironment() loads the class by
calling Class.forName(), which uses the classloader that loaded the GE
class, which happens to be the bootclassloader. I _could_ put my stuff
in the bootclasspath, but I don't like that so much, because it means I
have to put my native lib in the JDK lib directory as well. The Toolkit
class already uses the system classloader for loading the toolkit class.
Is there a strong reason to load the GE from the bootclassloader, or
could we apply the attached patch instead?

/Roman


Reply via email to