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 the various access specifiers for java classes?
Difference between static synchronization vs. Instance synchronization?
Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.
What is synchronization and why is it important in java programming?
Explain polymorphism citing an example.
What is a databasemetadata?
What are inbuilt functions?
Can singleton class be inherited in java?
What is a function in programming?
Which types of exceptions are caught at compile time?
What is use of map in java?
What is string example?