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
Post a Comment