Changeset 30128

Show
Ignore:
Timestamp:
24.08.2015 17:21:50 (4 years ago)
Author:
ak19
Message:

Bringing findjava for gs2 (used by gs2-setup.sh) up to speed with changes to GS3 to use bundled JRE on Mac.

Location:
main/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/findjava.sh

    r30106 r30128  
    5656    echo "Java Runtime Environment (version $MIN_DISPLAY_VERSION or greater) before running the" 
    5757    echo "$PROGNAME." 
    58     echo "If you have Java intalled on your machine please set the environment variable JAVA_HOME." 
     58    echo "If you have Java installed on your machine please set the environment variable JAVA_HOME." 
    5959    fi 
    6060    return 1 
  • main/trunk/greenstone2/findjava.sh

    r29010 r30128  
    6767 
    6868    # Give search4j a hint to find Java depending on the platform 
    69     if [ $GSDLOS = linux ]; then 
    70     HINT=`cd "$GSDLHOME";pwd`/packages/jre 
    71     elif [ $GSDLOS = darwin ]; then 
    72     # http://java.dzone.com/articles/java-findingsetting 
    73     # explains that /usr/libexec/java_home will print out the default JDK 
     69    # we now include a JRE with Mac (Mountain) Lion, because from Yosemite onwards there's no system Java on Macs 
     70    HINT=`cd "$GSDLHOME";pwd`/packages/jre     
     71     
     72    # we can't use boolean operator -a to do the AND, since it doesn't "short-circuit" if the first test fails 
     73    # see http://www.tldp.org/LDP/abs/html/comparison-ops.html 
     74    if [ "$GSDLOS" = "darwin" ] && [ ! -d "$HINT" ]; then 
     75        # http://java.dzone.com/articles/java-findingsetting 
     76    # explains that /usr/libexec/java_home will print the default JDK 
    7477    # regardless of which Mac OS we're on. Tested on Maverick, Lion, Leopard 
    7578    # (run `/usr/libexec/java_home -v 1.7` to find a specific version) 
    7679    HINT=`/usr/libexec/java_home` 
    77  
    7880    #HINT=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home 
    7981        #/System/Library/Frameworks/JavaVM.framework/Home 
    80     fi   
     82    fi 
    8183     
    8284    javapath="`"$SEARCH4J_EXECUTABLE" -e -p "$HINT" -m $MINIMUM_JAVA_VERSION`"