Ubuntu_Jython on Ubuntu

来源:互联网 发布:必修三数学算法程序 编辑:程序博客网 时间:2024/06/11 10:06

install jython package

  • download current release
  • install
java -jar jython_installer-2.5.1.jar

    check jython is in your PATH

    test it's working:

#! /usr/bin/env jython from java.util import Date, Locale print "hi"print Date();
jython test.py
export JYTHONPATH=/home/toto/lib1.jar:/home/toto/lib2.jar
  l = [    "/home/toto/lib1.jar",    "/home/toto/lib2.jar"  ]  for s in l:    sys.path.append(s)

Source: http://sujitpal.blogspot.com/2006/10/using-jython-to-call-java.html

  • Install Pydev
  • Window -> Preferences -> Pydev -> Interpreter - Jython -> button “New...” -> select jython.jar from your jython installation.
  • Run: Run As -> Jython Run
  • right-click on your project folder -> properties -> PyDev - PYTHONPATH -> Add zip/jar/egg
原创粉丝点击