java - How to run a shell command in a different working directory -




my program runs in directory in c: drive, need run shell commands in directory in drive d, example. how can this:

processbuilder builder =      new processbuilder( "cmd.exe", "/c", "cd \"d:\\\" && dir"); 

to change working directory of process, call directory() on builder before starting it.





wiki

Comments

Popular posts from this blog

python - Read npy file directly from S3 StreamingBody -

python - Minimize function with Scipy minimize -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -