- Timestamp:
- 2017-05-08T21:18:21+12:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/util/SafeProcess.java
r31663 r31665 33 33 34 34 public class SafeProcess { 35 public static int DEBUG = 0;35 public static int DEBUG = 1; 36 36 37 37 public static final int STDERR = 0; … … 741 741 SafeProcess prcs = new SafeProcess("which " + program); 742 742 prcs.runProcess(); 743 String output = prcs.getStdOutput(); 743 String output = prcs.getStdOutput().trim(); 744 ///System.err.println("*** 'which " + program + "' returned: |" + output + "|"); 744 745 if(output.equals("")) { 746 return false; 747 } else if(output.indexOf("no "+program) !=-1) { // from GS3's org.greenstone.util.BrowserLauncher.java's isAvailable(program) 748 log("@@@ SafeProcess.isAvailable(): " + program + "is not available"); 745 749 return false; 746 750 } … … 1010 1014 logger.info(msg); 1011 1015 1012 //System.err.println(msg);1016 System.err.println(msg); 1013 1017 1014 1018 //DebugStream.println(msg); … … 1019 1023 logger.error(msg, e); 1020 1024 1021 //System.err.println(msg);1022 //e.printStackTrace();1025 System.err.println(msg); 1026 e.printStackTrace(); 1023 1027 1024 1028 //DebugStream.println(msg); … … 1030 1034 logger.error(e); 1031 1035 1032 //e.printStackTrace();1036 e.printStackTrace(); 1033 1037 1034 1038 //DebugStream.printStackTrace(e);
Note:
See TracChangeset
for help on using the changeset viewer.