Unable to execute Java Code "Runtime.getRuntime().exec("cmd /c start runScript.bat");" using Jenkins

13 views
Skip to first unread message

Pritam Sharma

unread,
Oct 21, 2016, 12:38:26 AM10/21/16
to Jenkins Users
Hi All, 

    I am trying to execute a java class which contains the code :

 "Runtime.getRuntime().exec("cmd /c start runScript.bat");" 

I'm using apache ANT 1.7 and JDK7, when I call the ANT target from my Jenkins job ,It skips
this line of code "Runtime.getRuntime().exec("cmd /c start runScript.bat");" but doesn't throw any error also.So this runScript.bat file is not getting executed. (Also if I use only ANT, it is working fine.)
  Please suggest me how to handle this problem.

Regards
-Pritam
Reply all
Reply to author
Forward
0 new messages