Show
Ignore:
Timestamp:
25.08.2016 22:06:55 (3 years ago)
Author:
davidb
Message:

Greenstone code was overriding custom Java_Home set on Mac. We want to control that Java_Home to 1.7 to match the JRE we're including so first preference for Java_Home HINT to search4j is any JAVA_HOME already set.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/gs3-setup.sh

    r30127 r30755  
    181181  # we now include a JRE with Mac (Mountain) Lion too, because from Yosemite onwards there's no system Java on Macs 
    182182  HINT="`pwd`/packages/jre" 
    183   if [ "$GSDLOS" = "darwin" ] && [ ! -d "$HINT" ]; then 
    184       HINT=`/usr/libexec/java_home` 
    185       # old code used as fallback: 
    186       if [ ! -d "$HINT" ]; then 
    187           HINT=/System/Library/Frameworks/JavaVM.framework/Home 
     183   
     184  #if [ "$GSDLOS" = "darwin" ] && [ ! -d "$HINT" ]; then 
     185  if [ "$GSDLOS" = "darwin" ]; then 
     186      if [ "$JAVA_HOME" != "" ] && [ -d "$JAVA_HOME" ]; then 
     187      HINT=$JAVA_HOME 
     188      elif [ ! -d "$HINT" ]; then 
     189      HINT=`/usr/libexec/java_home` 
     190          # old code used as fallback: 
     191      if [ ! -d "$HINT" ]; then 
     192              HINT=/System/Library/Frameworks/JavaVM.framework/Home 
     193      fi 
    188194      fi 
    189195  fi