Answers for "how run a code to the cmd from a java code"

1

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
0

run java in cmd

C:\Users\Your Name>javac MyClass.java
Posted by: Guest on June-20-2021
0

how run a code to the cmd from a java code

java cmd
Posted by: Guest on October-21-2021

Code answers related to "how run a code to the cmd from a java code"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language