|
From: <no...@so...> - 2001-01-03 17:30:59
|
Bug #127422, was updated on 2001-Jan-03 09:30
Here is a current snapshot of the bug.
Project: Jython
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: nobody
Assigned to : nobody
Summary: Importing java-classes from non-defaul ClassLoaders
Details: I have my own classloader, which loads Jython also.
When I run this
+++++++
package a.b.c
import org.python.util.PythonInterpreter;
import org.python.core.*;
public class Test{
public static void main(String args[]) throws Exception {
PythonInterpreter interp = new PythonInterpreter();
interp.exec("from a.b.c import Test");
interp.exec("s = Test.countLetters('wednesday')");
PyObject x = interp.get("s");
System.out.println("s=" + x);
}
public static String countLetters(String str){
return "Word '"+str+"' has "+ str.length() + " letters";
}
}
++++++++++++++++
I have
"ImportError: no module named a"
But when I explicitly write my.jar(a.b.c.Test) to classpath - everithing is
Ok.
What about usin' Thead.getContextClassLoader() in Py.findClass() or
something?
PS can't register so my e-mail is an...@ib...
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=127422&group_id=12867
|