How to call Java from Python?

Steve Menard steve.menard at videotron.ca
Tue Jun 22 20:08:36 EDT 2004


Dave Kuhlman wrote:
> Is JPE (the Python Java Extension) being used widely/actively?
> 
> I tried to build it (with Python 2.3.4, j2se 1.4 on Debian
> GNU/Linux) and had quite a bit of trouble.  And, then, the samples
> did not run.
> 
> Is there another way to call Java code from Python?
> 
> The JPE project does not seem too active lately, or is it?
> 
> I need it to run in the Python environment, not the Java
> environment.  I want to be able to call Java methods from Python.
> I don't believe that can be done with Jython, can it?  Aren't I
> right that Jython runs in the Java environment and on Java VM?
> 
> For example, from within the Quixote Web framework, I want to be
> able to create Java objects and call their methods.
> 
> Thanks in advance for pointers.
> 
> Dave
> 

Seems like my project my project got started at the right time :)

Take a look at JPype http://jpype.sourceforge.net

it aims to do what JPE did (but work).

It is still early in development, and working on win32 exclusively for 
now (the linux port should consist only of a few lines of code, but I do 
not have a linux meachine readily available). If you have a little C 
coding knowledge, you might even contribute it :)

What's more, your's truly is doing his best to answer question and fix 
problems as they arise.

I hope this helps,

Steve Menard




More information about the Python-list mailing list