Launching and stopping appium server programmtically

I just tried with CommandLine and it worked after I changed:

CommandLine command = new CommandLine(“/bin/sh -c”);
command.addArgument(“/Applications/Appium.app/Contents/Resources/node/bin/node”,false);

to be:

CommandLine command = new CommandLine(“/Applications/Appium.app/Contents/Resources/node/bin/node”);

I am not sure what has changed since the last time, but it’s working now without invoking the shell app.

Give it a try and let me know how it works.