...
>Is there a way in java to determine if a file is executable on the OS?
>I.e. if it is a File that I can call Runtime.exec(file) on?
Well.. you can always 'try' it. What does this 13 lines
of code tell you?
<sscce>
import java.io.*;
class LaunchAsCommand {
public static void main(String[] args) throws Exception {
File f = new File("LaunchAsCommand.java");
try {
Runtime.getRuntime().exec(f.getCanonicalPath());
} catch(IOException e) {
System.err.println( e.getMessage() );
}
}
}
</sscce>

Signature
Andrew Thompson
http://www.athompson.info/andrew/
Philipp - 16 Oct 2007 12:44 GMT
> ..
>> Is there a way in java to determine if a file is executable on the OS?
[quoted text clipped - 18 lines]
> }
> </sscce>
OK thanks. Juste wanted to know if I missed some part of the API.
Best regards
Phil