*/
public static boolean isPovrayInstalled()
{
- try
- {
- Runtime.getRuntime().exec("povray");
- return true;
- }
- catch (IOException ioe)
- {
- // exception thrown, povray not found
- return false;
- }
+ return check("povray");
}
* @return true if found, false otherwise
*/
public static boolean isExiftoolInstalled()
+ {
+ return check("exiftool -v");
+ }
+
+ /**
+ * Attempt to call gpsbabel to see if it's installed / available in path
+ * @return true if found, false otherwise
+ */
+ public static boolean isGpsbabelInstalled()
+ {
+ return check("gpsbabel -V");
+ }
+
+ /**
+ * Attempt to call the specified command
+ * @return true if found, false otherwise
+ */
+ private static boolean check(String inCommand)
{
try
{
- Runtime.getRuntime().exec("exiftool -v");
+ Runtime.getRuntime().exec(inCommand);
return true;
}
catch (IOException ioe)
{
- // exception thrown, exiftool not found
+ // exception thrown, command not found
return false;
}
}