I have a Java program that writes a bash script. Unfortunately, when this script is saved, I need to change it (ubuntu 10.04) to include it as an executable. Any way around this?
I understand that this is a safety thing ...
bashScriptFile.setExecutable(true);
http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/io/File.html#setExecutable%28boolean%29
If you are not using JDK 1.6, you can do the following:
After writing the file, you can do something like
Runtime.getRuntime().exec("chmod +x "+yourfile.sh);
Source: https://habr.com/ru/post/1756205/More articles:Find the location of a specific character in NSString - objective-cHow to track the click of a Facebook Like Button? - facebookHow to intercept Tab tab in ActiveX in IE - internet-explorerUsing a VB class from the same ASP.NET website project in a C # class - c #Event listener in image view - androidВключение экрана в виртуальную веб-камеру - macosShould I run multiple SELECTs inside a PDO transaction to improve performance? - performanceCan I look forward to creating instances registered as singles using the castle's windsor? - dependency-injectionhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1756209/cuda-maintain-pointers-to-global-memory&usg=ALkJrhh5O8AJSouT9qSqGHoBbPuROu8tUgHow to create a new intent for another application broadcast receiver? - androidAll Articles