http://download.csdn.net/detail/xingjiarong/9429266 下载jython包,把其中的jython.jar添加到工程目录
一、在java类中直接执行python语句
import org.python.util.PythonInterpreter;
public class FirstJavaScript {
public static void main(String args[]) {
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.exec("days=('mod','Tue','Wed','Thu','Fri','Sat','Sun'); ");
interpreter.exec("print days[1];");
}