|
Patch: FYI: MainThread -vs- class loader: msg#00131java.classpath.patches
I'm checking this in. I'm going to put something similar in libgcj shortly. While implementing java.endorsed.dirs, I discovered that MainThread tries to load the main class using its own class loader. However, it is probable that MainThread is loaded by the bootstrap loader, while it needs to load the main class using the system class loader. This patch fixes the problem. Tom Index: ChangeLog from Tom Tromey <tromey@xxxxxxxxxx> * gnu/java/lang/MainThread.java (MainThread): Load main class using system class loader. Index: gnu/java/lang/MainThread.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/lang/MainThread.java,v retrieving revision 1.6 diff -u -r1.6 MainThread.java --- gnu/java/lang/MainThread.java 2 Mar 2005 17:29:08 -0000 1.6 +++ gnu/java/lang/MainThread.java 16 Mar 2005 23:41:43 -0000 @@ -57,7 +57,8 @@ public MainThread(String classname, String[] args) throws ClassNotFoundException, NoSuchMethodException { - Class found = Class.forName(classname); + Class found = Class.forName(classname, true, + ClassLoader.getSystemClassLoader()); Class[] argTypes = new Class[1]; argTypes[0] = args.getClass(); mainMethod = found.getMethod("main", argTypes);
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | FYI: Fix for the use of the reserved enum keyword in gnu.html, Andrew John Hughes |
|---|---|
| Next by Date: | RFC: JNI implementation of Selector #1, Robert Schuster |
| Previous by Thread: | FYI: Fix for the use of the reserved enum keyword in gnu.html, Andrew John Hughes |
| Next by Thread: | Re: Patch: FYI: MainThread -vs- class loader, Michael Koch |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |