Changeset 8777 in josm for trunk/linux


Ignore:
Timestamp:
2015-09-21T23:48:29+02:00 (9 years ago)
Author:
Don-vip
Message:

Basic Java 9 support: make code compile, and Linux scripts detect it

Location:
trunk/linux
Files:
2 edited

Legend:

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

    r8333 r8777  
    1212# If OpenJDK is only available headless, do not try it
    1313if dpkg --get-selections 'openjdk-*-jre' | grep install$ > /dev/null ; then
     14        JAVA9_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"
    1415        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"
    1516        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"
    1617else
     18        JAVA9_CMDS="/usr/lib/jvm/java-9-oracle/bin/java"
    1719        JAVA8_CMDS="/usr/lib/jvm/java-8-oracle/bin/java"
    1820        JAVA7_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-7-oracle/bin/java /usr/bin/java"
     
    4547done
    4648
     49for jcmd in $JAVA9_CMDS; do
     50        if [ "z$ALTERNATIVE_JDK" = "z`readlink -n -f $jcmd`" ] && [ -z "${JAVACMD}" ]; then
     51        JAVACMD="$jcmd"
     52    fi
     53done
     54
     55for jcmd in $JAVA9_CMDS; do
     56    if [ -x "$jcmd" -a -z "${JAVACMD}" ]; then
     57        JAVACMD="$jcmd"
     58    fi
     59done
     60
    4761if [ "$JAVACMD" ]; then
    4862    echo "Using $JAVACMD to execute josm-latest." || true
  • trunk/linux/tested/usr/bin/josm

    r8333 r8777  
    1212# If OpenJDK is only available headless, do not try it
    1313if dpkg --get-selections 'openjdk-*-jre' | grep install$ > /dev/null ; then
     14        JAVA9_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"
    1415        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"
    1516        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"
    1617else
     18        JAVA9_CMDS="/usr/lib/jvm/java-9-oracle/bin/java"
    1719        JAVA8_CMDS="/usr/lib/jvm/java-8-oracle/bin/java"
    1820        JAVA7_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-7-oracle/bin/java /usr/bin/java"
     
    4547done
    4648
     49for jcmd in $JAVA9_CMDS; do
     50        if [ "z$ALTERNATIVE_JDK" = "z`readlink -n -f $jcmd`" ] && [ -z "${JAVACMD}" ]; then
     51        JAVACMD="$jcmd"
     52    fi
     53done
     54
     55for jcmd in $JAVA9_CMDS; do
     56    if [ -x "$jcmd" -a -z "${JAVACMD}" ]; then
     57        JAVACMD="$jcmd"
     58    fi
     59done
     60
    4761if [ "$JAVACMD" ]; then
    4862    echo "Using $JAVACMD to execute josm." || true
Note: See TracChangeset for help on using the changeset viewer.