Execution of the following snippet fails with
LocalProcessBuilderFactory
.newLocalProcessBuilder()
/* some configuration omitted */
.workDirectory(sdkManagerPath)
.commandAndArguments("sdkmanager");
fails with following error
java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method) ~[?:1.8.0_321]
at java.lang.ProcessImpl.(ProcessImpl.java:453) ~[?:1.8.0_321]
at java.lang.ProcessImpl.start(ProcessImpl.java:140) ~[?:1.8.0_321]
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ~[?:1.8.0_321]
If you specify full path to command in commandAndArguments then everything command is executed correctly
Execution of the following snippet fails with
fails with following error
If you specify full path to command in commandAndArguments then everything command is executed correctly