Ignore:
Timestamp:
2015-08-24T17:21:50+12:00 (6 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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`"
Note: See TracChangeset for help on using the changeset viewer.