具体代码
            
              java代码
@Test
    public void contextLoads() throws IOException, InterruptedException {
        Process pr = Runtime.getRuntime().exec("python C:\\Users\\tianyong\\Desktop\\222.py");
        BufferedReader in = new BufferedReader(new InputStreamReader(pr.getInputStream(),"GBK"));
        String line;
        while ((line = in.readLine()) != null) {
            System.out.println(line);
        }
        in.close();
        pr.waitFor();
    }
            
          
          
            
              python代码
print("你好 world")
            
          
          


 
             
					 
					