I have a java program that writes a bash script. Unfortunately when this script is saved, I need to modify it (ubuntu 10.04) to enable running it as an executable. Any way of circumventing this?
I understand that it is a security thing...
I have a java program that writes a bash script. Unfortunately when this script is saved, I need to modify it (ubuntu 10.04) to enable running it as an executable. Any way of circumventing this?
I understand that it is a security thing...
If you are not using JDK 1.6 you can do following:
After writting file you can do something like
Runtime.getRuntime().exec("chmod +x "+yourfile.sh);