Changeset 0839b46 for installer


Ignore:
Timestamp:
May 4, 2016 4:05:30 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
16ff3e3, 4fd0261
Parents:
cdafab27
Message:

i2prouter: Set JAVA_HOME correctly on Mac OS X 10.5 and later (ticket #1783)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • installer/resources/i2prouter

    rcdafab27 r0839b46  
    489489fi
    490490
    491 # OSX always places Java in the same location so we can reliably set JAVA_HOME
     491# Through Java 6, OSX always places Java in the same location so we can reliably set JAVA_HOME
     492# As of OSX 10.5 / Java 7, call /usr/libexec/java_home to find it
     493# https://developer.apple.com/library/mac/qa/qa1170/_index.html
    492494if [ "$DIST_OS" = "macosx" ]
    493495then
    494496    if [ -z "$JAVA_HOME" ]; then
    495         JAVA_HOME="/Library/Java/Home"; export JAVA_HOME
     497        if [ -x "/usr/libexec/java_home" ]; then
     498            JAVA_HOME=`/usr/libexec/java_home`
     499        fi
     500        if [ -z "$JAVA_HOME" ]; then
     501            JAVA_HOME="/Library/Java/Home"
     502        fi
     503        export JAVA_HOME
    496504    fi
    497505fi
Note: See TracChangeset for help on using the changeset viewer.