In Toolkit.getDefaultToolkit() we need to use the system classloader. Otherwise the toolkit must be on the bootclasspath in order to be loadable. Using the system classloader it is sufficient to have it in -cp.
2006-04-19 Roman Kennke <[EMAIL PROTECTED]>
* java/awt/Toolkit.java
(getDefaultToolkit): Use system classloader to load the
toolkit.
/Roman
--
“Improvement makes straight roads, but the crooked roads, without
Improvement, are roads of Genius.” - William Blake
Index: java/awt/Toolkit.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Toolkit.java,v
retrieving revision 1.38
diff -u -1 -0 -r1.38 Toolkit.java
--- java/awt/Toolkit.java 6 Apr 2006 20:37:40 -0000 1.38
+++ java/awt/Toolkit.java 19 Apr 2006 19:29:58 -0000
@@ -528,21 +528,22 @@
* @throws AWTError If the toolkit cannot be loaded.
*/
public static Toolkit getDefaultToolkit()
{
if (toolkit != null)
return toolkit;
String toolkit_name = System.getProperty("awt.toolkit",
default_toolkit_name);
try
{
- Class cls = Class.forName(toolkit_name);
+ ClassLoader cl = ClassLoader.getSystemClassLoader();
+ Class cls = cl.loadClass(toolkit_name);
Object obj = cls.newInstance();
if (!(obj instanceof Toolkit))
throw new AWTError(toolkit_name + " is not a subclass of " +
"java.awt.Toolkit");
toolkit = (Toolkit) obj;
initAccessibility();
return toolkit;
}
catch (ThreadDeath death)
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
