Run Batch file from Java application

I want to run a batch file from java code,The batch file is having some comand prompt commands and I want that the window of command prompt should be maximized when i call the batch file

Thanks...
LVL 5
J KAsked:
Who is Participating?
 
deepakkumarc11Commented:
Runtime.getRuntime().exec("cmd /c start build.bat");
0
 
manavilaiCommented:
Runtime rt = Runtime.getRuntime();
rt.exec("batch file name");

try this should work for you.
0
 
J KAuthor Commented:
Thanks....
This will execute the batch file but the command prompt window will me hidden
ANd I want that to be maximized....
0
 
J KAuthor Commented:
Thanks.....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.