Answers for "explain the command java that we used to run java program"

5

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
1

how to run java file

javac <yourfilename>.java
after that do:
java <yourfilename>
Posted by: Guest on November-30-2021

Code answers related to "explain the command java that we used to run java program"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language