I fixed my file path but now getting this 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();
I fixed my file path but now getting this 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.