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

What is Collections API?

1 Answers  


Why string is a class?

0 Answers  


To what value is a variable of the Boolean type automatically initialized?

3 Answers  


What all access modifiers are allowed for top class ?

0 Answers  


For technical interview question please sir send me because tomorrow my interview

1 Answers   FactSet Systems,






Explain java code for recursive solution's base case?

0 Answers  


What is the default modifier in Interface?

5 Answers  


Why generics are used in java?

0 Answers  


Explain the difference between private, public, package and protected in java?

0 Answers  


How do you clear a method in java?

0 Answers  


What is string pooling concept?

0 Answers  


What does %4d mean in java?

0 Answers  


Categories