]> gitweb.fperrin.net Git - GpsPrune.git/blob - tim/prune/ExternalTools.java
cd65fffd519d68a95a21b0623dac2146d3e0048b
[GpsPrune.git] / tim / prune / ExternalTools.java
1 package tim.prune;
2
3 import java.io.IOException;
4
5
6 /**
7  * Class to manage interfaces to external tools, like exiftool
8  */
9 public abstract class ExternalTools
10 {
11
12         /**
13          * Attempt to call Povray to see if it's installed / available in path
14          * @return true if found, false otherwise
15          */
16         public static boolean isPovrayInstalled()
17         {
18                 try
19                 {
20                         Runtime.getRuntime().exec("povray");
21                         return true;
22                 }
23                 catch (IOException ioe)
24                 {
25                         // exception thrown, povray not found
26                         return false;
27                 }
28         }
29
30
31         /**
32          * Attempt to call Exiftool to see if it's installed / available in path
33          * @return true if found, false otherwise
34          */
35         public static boolean isExiftoolInstalled()
36         {
37                 try
38                 {
39                         Runtime.getRuntime().exec("exiftool -v");
40                         return true;
41                 }
42                 catch (IOException ioe)
43                 {
44                         // exception thrown, exiftool not found
45                         return false;
46                 }
47         }
48 }