Changeset 31697 for main/trunk/gli

Show
Ignore:
Timestamp:
22.05.2017 16:55:02 (3 years ago)
Author:
ak19
Message:

More changes to bring SafeProcess? GLI src version and GS3 src version up to speed with each other

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/util/SafeProcess.java

    r31692 r31697  
    2222 
    2323import java.lang.reflect.Field; 
    24 //import java.lang.reflect.Method; 
    2524 
    2625import org.apache.log4j.*; 
     
    897896    SafeProcess prcs = new SafeProcess("which " + program);      
    898897    prcs.runProcess(); 
    899     String output = prcs.getStdOutput(); 
     898    String output = prcs.getStdOutput().trim(); 
     899    ///System.err.println("*** 'which " + program + "' returned: |" + output + "|"); 
    900900    if(output.equals("")) { 
     901        return false; 
     902    } else if(output.indexOf("no "+program) !=-1) { // from GS3's org.greenstone.util.BrowserLauncher.java's isAvailable(program) 
     903        log("@@@ SafeProcess.isAvailable(): " + program + "is not available"); 
    901904        return false; 
    902905    }