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

Post New Answer

More Core Java Interview Questions

Why java is used everywhere?

0 Answers  


What is off heap memory?

0 Answers  


Difference between an argument and a parameter?

10 Answers   Accounting, HCL, IBM, Quinnox,


Difference between abstract and concrete class ?

0 Answers  


What is r * in math?

0 Answers  






What is * argv?

0 Answers  


what is use of business objects?

3 Answers   Tech Mahindra,


What is an example of character?

0 Answers  


How do you insert a line break?

0 Answers  


What does java se mean?

0 Answers  


What are the parameters used in Connection pooling?

1 Answers   IBM,


describe method overloading

0 Answers  


Categories