[kaffe] CVS kaffe (dalibor): final fix for Sun's RMI example getStarted. It works fine now.

Kaffe CVS cvs-commits at kaffe.org
Thu Aug 21 04:48:02 PDT 2003


PatchSet 3968 
Date: 2003/08/21 11:45:34
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
final fix for Sun's RMI example getStarted. It works fine now.

Members: 
	ChangeLog:1.1566->1.1567 
	libraries/javalib/kaffe/applet/AppletViewer.java:1.20->1.21 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1566 kaffe/ChangeLog:1.1567
--- kaffe/ChangeLog:1.1566	Thu Aug 21 10:59:29 2003
+++ kaffe/ChangeLog	Thu Aug 21 11:45:34 2003
@@ -1,3 +1,13 @@
+2003-08-21  Dalibor Topic <robilad at kaffe.org>,
+            Helmer Kraemer  <hkraemer at freenet.de>
+
+	Final fix for RMI getStarted example from
+	http://java.sun.com/j2se/1.4.2/docs/guide/rmi/getstart.doc.html
+	
+	* libraries/javalib/kaffe/applet/AppletViewer.java:
+	(createApplet) set context class loader of current thread to
+	applet class loader.
+	
 2003-08-21  Dalibor Topic <robilad at kaffe.org>
 
 	* libraries/clib/native/Class.c:
Index: kaffe/libraries/javalib/kaffe/applet/AppletViewer.java
diff -u kaffe/libraries/javalib/kaffe/applet/AppletViewer.java:1.20 kaffe/libraries/javalib/kaffe/applet/AppletViewer.java:1.21
--- kaffe/libraries/javalib/kaffe/applet/AppletViewer.java:1.20	Wed Jul  3 22:59:45 2002
+++ kaffe/libraries/javalib/kaffe/applet/AppletViewer.java	Thu Aug 21 11:45:35 2003
@@ -281,6 +281,10 @@
 
 	AppletClassLoader loader = 
 	    new AppletClassLoader(tag.getCodebaseURL(), tag.getArchiveTag());
+	/* Set the contect loader of the current thread to the applet class loader,
+	 * to avoid problems between casting classes loaded by separate class loaders.
+	 */
+	Thread.currentThread().setContextClassLoader(loader);
 
 	Class c = loader.loadClass(code);
 	app = (Applet) c.newInstance();




More information about the kaffe mailing list