@Hassan_Radi
I tried your suggestion for starting appium server through the following java code.
Somehow the server is not starting.When i check using the command sudo lsof -i :4723 there are no process running on the port 4723.
But when i try the same command manually in a terminal without /bin/sh the server starts successfully
Am i missing something here?
I am using Java 8 , Xcode 6.1 , MAC 10.10, Appium 1.3.1
public class Runner {
static String APPIUMCOMMAND = "/bin/sh /Applications/Appium.app/Contents/Resources/node/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js --address 0.0.0.0 --port 4723";
public static void main(String[] args) throws ExecuteException, IOException {
startAppiumServer();
}
public static void startAppiumServer() throws ExecuteException, IOException {
DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();
Executor executor = new DefaultExecutor();
executor.setExitValue(1);
executor.execute(new CommandLine(APPIUMCOMMAND), resultHandler);
}
Thanks in advance for your time.
Regards Srinidhi