I want to run a shell script from my plugin's directory.
Inside the resources directory, I've created another directory named "scripts" and have a script inside it named (let's say) script.sh
I tried to execute this script using Runtime.getRuntime().exec("sh script.sh") but it gave me an error :
Caused by: java.security.PrivilegedActionException: java.io.IOException: Cannot run program "sh script.sh": error=2, No such file or directory
I guess it's not able to find the shell script. Is there any way I can run the script in the plugin's directory? I don't want to ask the plugin's user to copy my script in his directory for it to work. It should work out of the box!
Any help would be really appreciated :)
Thanks in advance!