// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.io.*;

public class Main {
    public static void main(String[] args) {
        ProcessBuilder pb = new ProcessBuilder(new String[] { "C:\\python24\\python.exe", "test.py" });
        try {
            Process p = pb.start();
            p = pb.start();
            BufferedReader output = new BufferedReader(new InputStreamReader(p.getInputStream()));
            String line;
            while ((line = output.readLine()) != null) {
                System.out.println(line);
            }
            p.waitFor();
        } catch(Exception ex) {
            ex.printStackTrace();
        }
    }
}
