From: John G. <jgo...@co...> - 2001-11-09 14:16:11
|
bc...@wo... (Finn Bock) writes: > That is because the BytecodeLoaders happens to search the > SyspathJavaLoader before searching the referent class loaders. It's a > bug. [snip] > Try calling > > Py.getSystemState().setClassLoader(this.getClass().getClassLoader()); > > It will effectively disable attempts to import java classes from > sys.path and instead only try to load them from the MultiClassLoader. Hmm. It didn't work. (I tried setting it both before and after instantiating my PythonInterpreter object in Java; didn't work either way). Interesting data points: * In Python, I printed: print Py.getSystemState().getClassLoader().getClass().getName() result: com.lutris.classloader.MultiClassLoader which is correct. * Java still claims that the loader for the base class of my Python class is sun.misc.Launcher$AppClassLoader. I at least have it -- through MANY hacks -- showing the correct loader. * I just noticed that, somewhere along the line, Java shows the superclass of my ListBOFoo as being PyFunctionTable. Eep! I don't quite know where that changed from ListBO. Somewhere in my testing I guess. Sigh. Also: Is it possible to tell Jython where to create the .class files that it generates on the fly? -- John > > >Also: I'm now pulling the *class* from python to Java, not an instance of it. > >That seems to help, maybe... > > Nah. > > regards, > finn -- John Goerzen <jgo...@co...> GPG: 0x8A1D9A1F www.complete.org |