Update of /cvsroot/jython/jython/org/python/core
In directory usw-pr-cvs1:/tmp/cvs-serv13985
Modified Files:
Py.java
Log Message:
Fix for [ #480373 ] Can't find _PyInner with classloader.
Pass in the loaded _PyInner class instead of the classname.
Index: Py.java
===================================================================
RCS file: /cvsroot/jython/jython/org/python/core/Py.java,v
retrieving revision 2.53
retrieving revision 2.54
diff -C2 -d -r2.53 -r2.54
*** Py.java 2001/11/03 19:42:40 2.53
--- Py.java 2001/11/21 11:21:21 2.54
***************
*** 793,797 ****
}
! public static void runMain(String module, String[] args,
String[] packages,
String[] props,
--- 793,797 ----
}
! public static void runMain(Class mainClass, String[] args,
String[] packages,
String[] props,
***************
*** 801,813 ****
//System.err.println("main: "+module);
- Class mainClass=null;
- try {
- // ??pending: should use Py.findClass?
- mainClass = Class.forName(module);
- } catch (ClassNotFoundException exc) {
- System.err.println("Error running main. Can't find: "+module);
- System.exit(-1);
- }
-
initProperties(args, packages, props, frozenPackage, modules,
mainClass.getClassLoader());
--- 801,804 ----
***************
*** 818,822 ****
code = ((PyRunnable)mainClass.newInstance()).getMain();
} catch (Throwable t) {
! System.err.println("Invalid class: "+module+"$py");
System.exit(-1);
}
--- 809,813 ----
code = ((PyRunnable)mainClass.newInstance()).getMain();
} catch (Throwable t) {
! System.err.println("Invalid class: "+mainClass.getName()+"$py");
System.exit(-1);
}
|