直接执行python语句 ,将语句以String 的形式传递给python解释器
import org.python.util.PythonInterpreter;
/**
* Created by Mark on 2017/8/11.
*/
public class H {
public static void main(String[] args) {
PythonInterpreter pythonInterpreter = new PythonInterpreter();
pythonInterpreter.exec("print('Hello Java! I am Python ,Are you OK?')");
}
}
C:\Utility\Java\jdk1.8.0_91\bin\java -Didea.launcher.port=7532 “-Didea.launc