Answers for "command line to run java class"

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
0

java run class file

java -cp ./ {NAME}
Posted by: Guest on August-26-2020

Code answers related to "command line to run java class"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language