import org.python.util.PythonInterpreter;
import java.io.DataInputStream;
import java.util.Properties;
public static void main(String[] args) throws Exception{
Properties props = new Properties();
props.put("python.home", "D:\\jython2.7.2\\software\\Lib");
props.put("python.console.encoding", "UTF-8");
props.put("python.security.respectJavaAccessibility", "false");
props.put("python.import.site", "false");
Properties properties = System.getProperties();
PythonInterpreter.initialize(properties, props, new String[0]);
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.exec("print('hello')");
public static void fun() throws Exception{
String command = "F:\\graduate\\pro\\src\\main\\java\\p1.py";
String[] cmdArr = new String[] {exe,command};
Process process = Runtime.getRuntime().exec(cmdArr);
DataInputStream dis = new DataInputStream(process.getInputStream());
while((str = dis.readLine()) != null)