Integration with java (Jpype vs. JPE)

Steve Menard foo at bar.com
Mon Jan 17 17:58:24 EST 2005


Istvan Albert wrote:
> Cameron Laird wrote:
> 
>> Someone really ought to include a couple of sentences to that effect
>> on the front page of <URL: http://jpype.sf.net/ >.
> 
> 
> Now I remember visiting this site, but never understood how it
> actually worked. Examples such as:
> 
> from jpype import *
> startJVM("d:/tools/j2sdk/jre/bin/client/jvm.dll", "-ea")
> java.lang.System.out.println("hello world")
> shutdownJVM()
> 
> in three different versions are the only code examples
> that to show "complete" working snippets. I'm still
> clueless as to how would one say share a list between
> python and java.
> 
> Istvan.
> 
> 

I am sorry you find the site so confusing ... perhpas I shold post a 
more complete example in a prominent location ...

To asnwer your question more fully, the jpype-specific cide is only for 
looking up the Classes and startting/stopping the environment. For 
everything else, Java objects and classes are used as regular Python 
objects.

In version 0.4.x, the API mostly remain Java's. This means some of the 
basic magic python methods have been mapped to java equivalent (like 
__str__ mapped to toString() and __eq__ mapped to equals()).

If you have any questions, feel free to post them on the feedback list 
on sourceforge. I check it every day and I try to answer as quickly as 
possible.

Steve, aka devilwolf on sourceforge, maintainer of JPype



More information about the Python-list mailing list