How to execute a java program with the help of Runtime.getRuntime().exec(). For example we shall have the java file path as c:/java/abc.java. Please help me with the code.>
You should use ProcessBuilder instead of Runtime. Basic usage is like:
Process process = new ProcessBuilder(command).start();
You will find more code under the link above. Also see this question.