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
Why is an interface be able to extend more than one interface but a class can’t extend more than one class?
What is implicit object in java?
How many times garbage collector will invoke an object?s finalize() method?
Discuss 2D arrays.
different between exception and error? explaim check and uncheck exception
Does constructor be static?
where do you place after you did code in java
How do you generate random numbers in java?
What classes of exceptions may be thrown by a throw statement?
Why hashset is used in java?
What is the difference between yield() and sleep()?
What do you know about the garbate collector?