Reputation: 1
i want to execute a sheel on my Eclipse, and am unable to do so, is it because eclipse does not support shell script or do we any plugin for it.
I am executing it like this, and Name is Argument than i am passing to my script as search pattern.
$ String[] commands = {"C:/Users/shreyas.a.ramesh.DIR/workspace/Shellweb/src/Search_file.sh", Name};
And error I get is as follows
java.io.IOException: Cannot run program
"C:/Users/shreyas.a.ramesh.DIR/workspace/Shellweb/src/Search_file.sh": CreateProcess error=2, The system cannot find the file specified
Sorry about the code indentation.
Upvotes: 0
Views: 623
Reputation: 20003
This isn't a Java or Eclipse problem. Shell scripts aren't executable binaries. You'll have to run the shell binary itself with whatever arguments it needs to interpret your script.
Upvotes: 2