Jython integration with Java API seems awkward

Bug #144154 reported by Paul Boddie
4
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/jython/Lib-cpython/urllib.py", line 26, in ?
  File "/usr/share/jython/Lib/socket.py", line 12, in ?
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.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 RC or later?

Changed in jython:
status: New → Incomplete
Revision history for this message
Paul Boddie (paul-boddie) wrote :

Maybe. I'm not running 8.10, but the jython package still only recommends jython-gcj in that release. So I guess the problem is still there.

Revision history for this message
Ralph Janke (txwikinger) wrote :

We'd like to figure out what's causing this bug for you, but we haven't heard back from you in a while. Is this still a problem in 9.04? Thanks!

Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

We'd like to figure out what's causing this bug for you, but we haven't heard back from you in a while. Could you please provide the requested information? Thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for jython (Ubuntu) because there has been no activity for 60 days.]

Changed in jython (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.