Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProcessExecutor can't run command from working directory #1

Open
pgorbachev opened this issue Apr 8, 2022 · 2 comments
Open

ProcessExecutor can't run command from working directory #1

pgorbachev opened this issue Apr 8, 2022 · 2 comments

Comments

@pgorbachev
Copy link

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

@vicspbsky
Copy link
Contributor

@pgorbachev, what is operation system?

@pgorbachev
Copy link
Author

pgorbachev commented Sep 25, 2022

@vicspbsky , If i'am not mistaken it occured on local environment in Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants