I'm getting the below error when trying to run a shell script from java in Eclipse.
I just created a text file on my local and wanted to see if it will run.
new ProcessBuilder("C:/Users/myDir/Desktop/ss1.sh").start();
You cannot run a shell script on Windows directly as it is no executable in the Windows sense (only .exe
, .com
, .cmd
and .bat
are executables).
Call bash.exe
or sh.exe
and use your script as the first parameter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With