Showing results for 
Search instead for 
Did you mean: 

running exe or bat file in groovy

Super Contributor

Re: running exe or bat file in groovy

Go to C:// folder and create a Folder (Demo) and add create demo.bat file and below code there :- 


cd C:\Demo   
java -jar C:/Demo/user.jar (.jar file which you want to execute)


Save it as demo.bat.


Then in Soap UI write below line of code :-


Process proc=Runtime.getRuntime().exec("cmd /c start c:\\Demo\\demo.bat");


This will work fine.. I have tried above code. 



Re: running exe or bat file in groovy

Please refer to this KB: 

How to execute process in Groovy and get output of process?

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

New Here?
Join us and watch the welcome video:
Top Kudoed Authors