Executes the command in a separate process.
import java.io.IOException;
import java.util.*;
public class Lautturi {
public static void main(String[] args) throws IOException {
Runtime.getRuntime().exec("D:\\Python\\Python37\\python.exe -V");// testing for windows
Runtime.getRuntime().exec("python -V");// testing for unix
Runtime.getRuntime().exec("ls -l");
}
}Sourcewww:.lautturi.com