Writing bash scripts from Java

I have a java program that writes bash scripts Unfortunately, when saving this script, I need to modify it (Ubuntu 10.04) to enable it to run as an executable Is there any way around this?

I know it's safe

Solution

bashScriptFile.setExecutable(true);
bashScriptFile.setExecutable(true);

http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/io/File.html#setExecutable%28boolean%29

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>