Message201
With a classpath containing classes from the same package in both a directory
and jar file (in that order), 'import' only checks the first one (the
directory).
- set the classpath to include only the current directory, followed by one jar
file (order is important), eg. CLASSPATH=.:kFQueue.jar
- identify two classes which exist in the jar file, eg.
com.pplus.util.Comparator and com.pplus.util.BooleanComparator, and:
- create a matching directory structure, eg. com/pplus/util
- copy the _first_ class file to that directory
- now start JPython, import the first class, _then_ import the second class -
this will fail. Eg.
JPython 1.1+07 on java1.3.0 (JIT: null)
Copyright (C) 1997-1999 Corporation for National Research Initiatives
>>> from com.pplus.util import Comparator
>>> from com.pplus.util import BooleanComparator
Traceback (innermost last):
File "<console>", line 1, in ?
AttributeError: instance of 'org.python.core.PyJavaDirPackage' has no
attribute
'BooleanComparator'
|
|
Date |
User |
Action |
Args |
2008-02-20 17:16:45 | admin | link | issue222876 messages |
2008-02-20 17:16:45 | admin | create | |
|