Message691

Author nobody
Recipients
Date 2002-07-19.13:45:16
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
There is a bug in jython when importing
a java class, under the following conditions:

1) The class is qualified, i.e. in a package
2) The class is loaded via a custom ClassLoader

If either of the above conditions are not true, the bug
does not occur.

To run the example, do the following:

- set CLASSPATH to include TestLoader.class,  but NOT
Both.jar.
- java TestLoader

TestLoader will create a URLClassLoader that loads from
Both.jar, which
contains definitions for the classes NotQual and
foo.Qual.  It will
then invoke the jython interpreter on Example.py, which
will try to
import and use both of those classes.  NotQual will
work, but foo.Qual
throws an exception:

Exception in thread "main" Traceback (innermost last):
  File "Example.py", line 4, in ?
ImportError: no module named foo
"README" [readonly] 37L, 1246C
History
Date User Action Args
2008-02-20 17:17:07adminlinkissue583825 messages
2008-02-20 17:17:07admincreate