From: Finn B. <bc...@us...> - 2001-11-21 11:22:48
|
Update of /cvsroot/jython/jython/org/python/compiler In directory usw-pr-cvs1:/tmp/cvs-serv14230 Modified Files: JavaMaker.java Log Message: Fix for [ #480373 ] Can't find _PyInner with classloader. Load the _PyInner class in the main class. That way it gets loaded by the same classloader. Index: JavaMaker.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/compiler/JavaMaker.java,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -d -r2.12 -r2.13 *** JavaMaker.java 2001/10/28 17:13:42 2.12 --- JavaMaker.java 2001/11/21 11:22:45 2.13 *************** *** 143,148 **** ClassFile.PUBLIC | ClassFile.STATIC); ! // Load the name of the Python module to run code.ldc(pythonModule); // Load in any command line arguments code.aload(0); --- 143,153 ---- ClassFile.PUBLIC | ClassFile.STATIC); ! // Load the class of the Python module to run ! int forname = code.pool.Methodref( ! "java/lang/Class","forName", ! "(Ljava/lang/String;)Ljava/lang/Class;"); code.ldc(pythonModule); + code.invokestatic(forname); + // Load in any command line arguments code.aload(0); *************** *** 153,157 **** int runMain = code.pool.Methodref( "org/python/core/Py", "runMain", ! "(Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;Z)V"); code.invokestatic(runMain); code.return_(); --- 158,162 ---- int runMain = code.pool.Methodref( "org/python/core/Py", "runMain", ! "(Ljava/lang/Class;[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;Z)V"); code.invokestatic(runMain); code.return_(); |