How to call java from python?

Ype Kingma ykingma at
Wed Aug 8 13:05:05 CEST 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.

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

More information about the Python-list mailing list