You can query System.getProperties to find out, for System.getProperty(
String), I'm not what string returns the OS, but it shouldn't be too difficult to find. As far as executing something in Linux, it works a little differently than on Windows. Linux relies on permissions, rather than on file extensions to tell it which apps are executable. You will need to set the permissions to executable using the chmod command.