Answers for "what is the command used to run java program from command line"

4

java run cmd

public void excCommand(String new_dir){
    Runtime rt = Runtime.getRuntime();
    try {
        rt.exec(new String[]{"cmd.exe","/c","start"});

    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}
Posted by: Guest on July-05-2021

Code answers related to "what is the command used to run java program from command line"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language