Changeset 10580 in josm for trunk/linux/tested/usr/bin


Ignore:
Timestamp:
2016-07-21T01:57:41+02:00 (5 years ago)
Author:
Don-vip
Message:

see #11390 - switch to Java 8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/linux/tested/usr/bin/josm

    r10430 r10580  
    33set -e
    44
    5 # First, users preference as defined by $JAVA_HOME. Next, use OpenJDK or Oracle's proprietary JDK.
     5# First, the alternative (if known to work) or users preference as defined by $JAVA_HOME. Next, use OpenJDK or Oracle's proprietary JDK.
    66# Override to a specific one using $JAVACMD
     7ALTERNATIVE_JDK="`readlink -n -f /etc/alternatives/java`"
     8
    79# Let's get the current architecture -- needed for multiarchified Java
    810ARCH="`dpkg --print-architecture 2> /dev/null || true`"
     
    1214        JAVA_CMDS="$JAVA_HOME/bin/java"
    1315        JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-8-openjdk/bin/java /usr/lib/jvm/java-8-openjdk-$ARCH/bin/java /usr/lib/jvm/java-8-oracle/bin/java"
    14         JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-7-openjdk/bin/java /usr/lib/jvm/java-7-openjdk-$ARCH/bin/java /usr/lib/jvm/java-7-oracle/bin/java"
    1516        JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-9-openjdk/bin/java /usr/lib/jvm/java-9-openjdk-$ARCH/bin/java /usr/lib/jvm/java-9-oracle/bin/java"
    1617else
    1718        JAVA_CMDS="$JAVA_HOME/bin/java /usr/bin/java"
    1819        JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-8-oracle/bin/java"
    19         JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-7-oracle/bin/java"
    2020        JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-9-oracle/bin/java"
    2121fi
     
    2626
    2727JAVA_OPTS="-Djosm.restart=true -Djava.net.useSystemProxies=true $JAVA_OPTS"
     28
     29if [ -z "${JAVACMD}" ]; then
     30    for jcmd in $JAVA_CMDS; do
     31        if [ "z$ALTERNATIVE_JDK" = "z`readlink -n -f $jcmd`" ] && [ -z "${JAVACMD}" ]; then
     32            JAVACMD="$jcmd"
     33            break
     34        fi
     35    done
     36fi
    2837
    2938if [ -z "${JAVACMD}" ]; then
Note: See TracChangeset for help on using the changeset viewer.