How to call Java from Python?

Harry George harry.g.george at boeing.com
Wed Jun 23 10:04:41 EDT 2004


Steve Menard <steve.menard at videotron.ca> writes:

> 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
> 

0. Yep, a lot of us need something like this.

1. You could add a link to JPE on the JPype website.  Also, it may
   have reusable code, idioms, patterns, etc.  Broken or not, it was
   apparently further along than JPype when it stopped.

2. I'm willing to help, but will have to do it off-hours, at home.
   Specifically, the Linux (*NIX) port.  

3. I get the impression that the win32-centric part is in javaenv.hpp,
   with its use of HINSTANCE.  Anything else come to mind?

4. If there are multiple people willing to help, are you setup to
   project manage the effort?   E.g.:
   a) extending the developer's guide documentation as we learn more
   b) regression tests
   c) prioritizing and coordinating work teams



-- 
harry.g.george at boeing.com
6-6M21 BCA CompArch Design Engineering
Phone: (425) 342-0007



More information about the Python-list mailing list