hari
hari

Reputation: 1377

IOException Adventure

I have my java process(in my system) trying to talk to a shellscript(details1.sh),which is in /tmp dir of a remote system(of course the 2 systems are connected). But i am getting this exception-

java.io.IOException: Cannot run program "/tmp/details1.sh": java.io.IOException: error=2, No such file or directory

I've changed the permissions to 777 also..

But I'm not able to figure out how to get through this one. Any idea??

Upvotes: 0

Views: 164

Answers (1)

Jon Skeet
Jon Skeet

Reputation: 1502696

You should probably invoke the shell (e.g. /bin/bash) directly, passing the script to execute as the filename.

EDIT: As per comments, this may not be the problem - but it's certainly what I'd try first.

Another edit: You appear to be trying to run /tmp/details1.sh, but you say that's in the /tmp directory of a remote system. Obviously if you try to just run /tmp/details1.sh it's going to look in the local /tmp directory... how are you expecting it to know about the remote system?

Upvotes: 1

Related Questions