I want to change my directory and then execute a command to execute a testng class.
These is the command to change directory
cd D:\ACS\AndroidAutomationScripts\UiMutilator-master
This is the command to run testng class once i change dirctory
java -cp "D:\ACS\AndroidAutomationScripts\UiMutilator-master\lib\*;D:\ACS\AndroidAutomationScripts\UiMutilator-master\bin" org.testng.TestNG regression.xml
When I executed these commands from command prompt and from a bat file from java programmatically they are running fine.
But i want to execute these commands from java program only and in a particular directory.
I have tried creating multiple Process objects and tried executing it but it didnt worked.