Jython integration with Java API seems awkward
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
jython (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: jython
After installing the jython package, attempts to import Java API functionality seem to fail:
Jython 2.1 on java1.4.2 (JIT: null)
>>> import urllib
Traceback (innermost last):
File "<console>", line 1, in ?
File "/usr/share/
File "/usr/share/
ImportError: no module named java
Here, the code causing the failure is as follows:
import java.net
Although Jython works without the Java API, and although the jython-gcj package appears to provide the missing support, the disconnect here seems somewhat awkward: we are importing functionality provided in the package only to find that the underlying support for the functionality is missing. I suppose that people should install jython-gcj for a "full Jython", but it doesn't seem very obvious at a glance (from the package descriptions) which package provides this experience, and I would guess that people frequently choose the wrong thing at first, then choose all available packages just to be sure.
I wonder whether the package granularity isn't just confusing for people, at least with the way the packages are described at present. "Python seamlessly integrated with Java" isn't really what the jython package provides, since the API libraries are missing. And the qualification "(native support for gij)" doesn't suggest a lot to people looking for the missing .jar files.
Is this symptom still reproducible in 8.10 RC or later?