Wednesday, May 12, 2010

Java in Python : JPype on Ubuntu Lucid

sudo apt-get install python-jpype openjdk-6-jdk
sudo update-java-alternatives -s java-6-openjdk

from jpype import *

startJVM("/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server/libjvm.so", "-ea")

java.lang.System.out.println("Hello World")

shutdownJVM()

No comments:

Post a Comment