public class BatchTest
{
public static void main(String[] args)
{
Runtime run = Runtime.getRuntime();
try
{
Process p = run.exec("cmd start /c
D:/test.bat");
System.out.println(p.exitValue());
}
catch (Exception e)
{
e.printStackTrace();
}
System.out.println("FINISHED");
}
}
No Answer is Posted For this Question
Be the First to Post Answer
What are static blocks and static initalizers in java ?
Which variable is the independent variable?
How do you use spaces in java?
Which is better singleton or static class?
How are commas used in the initialization and iteration parts of a for statement?
Why is java not 100% pure oops?
What happens to the Exception object after handling an exception?
What is difference between static variable and global variable?
What are the rules for naming an array?
Why can't we override private static methods?
Difference between static methods, static variables, and static classes in Java.
What is the benefit of singleton pattern?