I want to run another process written in java. But I don't know how to do it. I searched the internet but only found how to start notepad. I have a class main, in it I want to start a new process ChildMain. How to do it ?
public class Main {
    public static void main(String[] args) throws IOException, InterruptedException {
        Process process = Runtime.getRuntime()
                .exec("javac -cp src/child/ChildMain.java");
        Thread.sleep(10000);
    }
public class ChildMain {
    public static void main(String[] args) {
        // code
    }
}
If anyone has an example or know how to do it, please tell me
 
    