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
How can I right-justify a string?
What are dot operator queries?
What is the difference between Error, defect,fault, failure and mistake?
Can the garbage collection be forced by any means?
what is the difference b/w static and final methods?
What is command line argument
how can we import the user defined package without classpath?
Where is the find and replace?
What invokes a thread's run() method in java programming?
What is method overriding in java ?
What are java annotations?
What does indexof return in java?