3 import java.io.IOException;
7 * Class to manage interfaces to external tools, like exiftool
9 public abstract class ExternalTools
13 * Attempt to call Povray to see if it's installed / available in path
14 * @return true if found, false otherwise
16 public static boolean isPovrayInstalled()
18 return check("povray");
23 * Attempt to call Exiftool to see if it's installed / available in path
24 * @return true if found, false otherwise
26 public static boolean isExiftoolInstalled()
28 return check("exiftool -v");
32 * Attempt to call gpsbabel to see if it's installed / available in path
33 * @return true if found, false otherwise
35 public static boolean isGpsbabelInstalled()
37 return check("gpsbabel -V");
41 * Attempt to call gnuplot to see if it's installed / available in path
42 * @return true if found, false otherwise
44 public static boolean isGnuplotInstalled()
46 return check(Config.getGnuplotPath() + " -V");
50 * Attempt to call the specified command
51 * @return true if found, false otherwise
53 private static boolean check(String inCommand)
57 Runtime.getRuntime().exec(inCommand);
60 catch (IOException ioe)
62 // exception thrown, command not found