Hi, JGecko is broken! And since Roman is so proud of it that must be fixed asap of course :) The problem is that when run as a normal user (-cp examples.zip gnu.classpath.examples.swing.HtmlDemo) the editor kit isn't found since JEditorPane only looks for bootstrap classes. This is clearly wrong. So this patch makes sure they can be loaded from the system class loader.
2006-12-07 Mark Wielaard <[EMAIL PROTECTED]>
* javax/swing/JEditorPane.java (createEditorKitForContentType):
Always load from system class loader.
This is only a partial fix for the real problem that
createEditorKitForContentType() isn't obeying the ClassLoader as given
to registerEditorKitForContentType(). Comments added to make this clear.
Committed,
Mark
diff -u -r1.42 JEditorPane.java
--- javax/swing/JEditorPane.java 6 Dec 2006 20:21:06 -0000 1.42
+++ javax/swing/JEditorPane.java 7 Dec 2006 22:05:25 -0000
@@ -711,7 +711,10 @@
{
try
{
- e = (EditorKit) Class.forName(className).newInstance();
+ // XXX - This should actually depend on the classloader
+ // registered with the type. See registerEditorKitForContentType.
+ ClassLoader ldr = ClassLoader.getSystemClassLoader();
+ e = (EditorKit) Class.forName(className, true, ldr).newInstance();
}
catch (Exception e2)
{
signature.asc
Description: This is a digitally signed message part
