Changeset 8333 in josm for trunk/linux


Ignore:
Timestamp:
2015-05-06T01:04:41+02:00 (10 years ago)
Author:
Don-vip
Message:

see #11390 - prefer Java 8 runtime over Java 7 in launch script

Location:
trunk/linux
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/linux/latest/usr/bin/josm-latest

    r8317 r8333  
    1212# If OpenJDK is only available headless, do not try it
    1313if dpkg --get-selections 'openjdk-*-jre' | grep install$ > /dev/null ; then
    14         JAVA_CMDS="$JAVA_HOME/bin/java /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 /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"
     14        JAVA8_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"
     15        JAVA7_CMDS="$JAVA_HOME/bin/java /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"
    1516else
    16         JAVA_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-8-oracle/bin/java /usr/lib/jvm/java-7-oracle/bin/java /usr/bin/java"
     17        JAVA8_CMDS="/usr/lib/jvm/java-8-oracle/bin/java"
     18        JAVA7_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-7-oracle/bin/java /usr/bin/java"
    1719fi
    1820
    1921JAVA_OPTS="-Djosm.restart=true -Djosm.home=$HOME/.josm-latest -Djava.net.useSystemProxies=true $JAVA_OPTS"
    2022
    21 for jcmd in $JAVA_CMDS; do
     23for jcmd in $JAVA8_CMDS; do
    2224        if [ "z$ALTERNATIVE_JDK" = "z`readlink -n -f $jcmd`" ] && [ -z "${JAVACMD}" ]; then
    2325        JAVACMD="$jcmd"
     
    2527done
    2628
    27 for jcmd in $JAVA_CMDS; do
     29for jcmd in $JAVA8_CMDS; do
     30    if [ -x "$jcmd" -a -z "${JAVACMD}" ]; then
     31        JAVACMD="$jcmd"
     32    fi
     33done
     34
     35for jcmd in $JAVA7_CMDS; do
     36        if [ "z$ALTERNATIVE_JDK" = "z`readlink -n -f $jcmd`" ] && [ -z "${JAVACMD}" ]; then
     37        JAVACMD="$jcmd"
     38    fi
     39done
     40
     41for jcmd in $JAVA7_CMDS; do
    2842    if [ -x "$jcmd" -a -z "${JAVACMD}" ]; then
    2943        JAVACMD="$jcmd"
  • trunk/linux/tested/usr/bin/josm

    r8317 r8333  
    1212# If OpenJDK is only available headless, do not try it
    1313if dpkg --get-selections 'openjdk-*-jre' | grep install$ > /dev/null ; then
    14         JAVA_CMDS="$JAVA_HOME/bin/java /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 /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"
     14        JAVA8_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"
     15        JAVA7_CMDS="$JAVA_HOME/bin/java /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"
    1516else
    16         JAVA_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-8-oracle/bin/java /usr/lib/jvm/java-7-oracle/bin/java /usr/bin/java"
     17        JAVA8_CMDS="/usr/lib/jvm/java-8-oracle/bin/java"
     18        JAVA7_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-7-oracle/bin/java /usr/bin/java"
    1719fi
    1820
    1921JAVA_OPTS="-Djosm.restart=true -Djava.net.useSystemProxies=true $JAVA_OPTS"
    2022
    21 for jcmd in $JAVA_CMDS; do
     23for jcmd in $JAVA8_CMDS; do
    2224        if [ "z$ALTERNATIVE_JDK" = "z`readlink -n -f $jcmd`" ] && [ -z "${JAVACMD}" ]; then
    2325        JAVACMD="$jcmd"
     
    2527done
    2628
    27 for jcmd in $JAVA_CMDS; do
     29for jcmd in $JAVA8_CMDS; do
     30    if [ -x "$jcmd" -a -z "${JAVACMD}" ]; then
     31        JAVACMD="$jcmd"
     32    fi
     33done
     34
     35for jcmd in $JAVA7_CMDS; do
     36        if [ "z$ALTERNATIVE_JDK" = "z`readlink -n -f $jcmd`" ] && [ -z "${JAVACMD}" ]; then
     37        JAVACMD="$jcmd"
     38    fi
     39done
     40
     41for jcmd in $JAVA7_CMDS; do
    2842    if [ -x "$jcmd" -a -z "${JAVACMD}" ]; then
    2943        JAVACMD="$jcmd"
Note: See TracChangeset for help on using the changeset viewer.