How to call java from python?

Ype Kingma ykingma at accessforall.nl
Wed Aug 8 07:05:05 EDT 2001


Larry Han wrote:
> 
> Is there any way to use java method from python?
> Like calling C from python, it seems reasonable to
> drag java and python closer.

Absolutely: www.jython.org
In jython you can do eg.:

  import java

  jht = java.util.Hashtable()

  jht.put(1,'Hello world')

  print jht.get(1)


At the moment you can't call both C and java, but it seems
there is work going on on jpe, a java python extension.

-- 
email at xs4all.nl



More information about the Python-list mailing list