0

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.

Leonardo Alves Machado
  • 2,747
  • 10
  • 38
  • 53

1 Answers1

2

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.

nitind
  • 19,089
  • 4
  • 34
  • 43