I was using the earlier version of Appium, and was able to start the appium server through following Java code. I have installed Appium 1.6 now. I have added the capability automationName: XCUITest. What needs to be changed here to make it work with the new Appium?:
> CommandLine command = new CommandLine("/Applications/Appium.app/Contents/Resources/node/bin/node"); command.addArgument("/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js", false);
> command.addArgument("--address", false);
> command.addArgument("0.0.0.0");
> command.addArgument("--port", false);
> command.addArgument("4723");
> command.addArgument("--full-reset", false);
> command.addArgument("--log-level", false);
> command.addArgument("error");
> DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();
> DefaultExecutor executor = new DefaultExecutor();
> executor.setExitValue(1);
> executor.execute(command, resultHandler);