Will GPL Java eat into Python marketshare?

Paul Boddie paul at boddie.org.uk
Thu Nov 16 23:05:45 CET 2006

Maurice LING wrote:
> Say given cytoscape.jar, I'll like to be able to do this:
>  >>> from cytoscape javaimport cytoscape
>  >>> c = cytoscape()
> And the tighest way I see that this can be done is for Python VM to
> execute Java bytecodes like Python bytecodes. That is, Python VM
> executes Java bytecodes directly and not through object mapping which I
> think is that JPyPe is doing.

This kind of thing is what I wanted to do with my javaclass experiment,
but I lost motivation/momentum after getting only some of the things to
work. Translating Java bytecodes isn't hard for most of the instruction
set, although exception handling was awkward at the time (before Python
2.5's new-style Exception class), and I'd have to think through the
interpackage referencing problem again (circular references are not
typically a problem in the Java package hierarchy). In the end, I
couldn't justify spending the time in order to use certain pieces of
software that weren't so compelling after all.

> I must say that this is part of even a fluffier dream that one day, I
> can take any applications and play around with it in Python. Currently,
> my collaborators wrote in Perl and Java, so it is not easy for me to use
> their work in my work.

There's always Jython, as I tell the occasional person who tries
javaclass expecting it to be better than it is. That Jython doesn't
support the latest CPython features shouldn't be as huge a problem as
people suspect, especially if you just want to glue Java packages
together with Python. Otherwise, the PyLucene approach (gcj + bindings)
might be an acceptable approach: a well performing Free Software
solution even before the recent Java licensing events.


More information about the Python-list mailing list