linux - java.io.IOException: Cannot run program "/usr/bin/sh": java.io.IOException: error=2, No such file or directory -


i wanted perform rename , delete function , environment linux. code i'm using,

string[] command_ary = { "/usr/bin/sh", "-c", command }; runtime runtime = runtime.getruntime(); process process = runtime.exec( command_ary ); 

but im getting following error message,

java.io.ioexception: cannot run program "/usr/bin/sh": java.io.ioexception: error=2, no such file or directory 

can me. thank-you

as exception says, there's no file /usr/bin/sh on system. if you're looking bourne shell, that's /bin/sh.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -