From: Cory R. <cri...@th...> - 2006-06-03 07:12:42
|
I'm having a hard time figuring out how to load my jars on the fly and reading through the archives I've found lots of similar questions but nothing I've tried has worked. Here's the scenario- I've downloaded and installed jython-2.1. I have a directory C:\somewhere\lib with some jars in it. One of these jars has com.something.MyClass.class in it. I don't have a CLASSPATH environment variable or anything like that. So, I start jython using the jython.bat file. Then: >>> import sys >>> sys.add_extdir("C:/somewhere/lib") >>> import com.something >>> x = com.something.MyClass() Traceback (innermost last): File "<console>", line 1, in ? AttributeError: java package 'com.something' has no attribute 'MyClass' MyClass is public.I can also do this: >>> dir(com.something) ['ISomething', 'MyClass', 'MyClass2', '__name__'] So jython knows about MyClass. Any idea what I need to do? Thanks. |