Changeset 15491 in josm


Ignore:
Timestamp:
2019-11-01T13:30:58+01:00 (5 months ago)
Author:
Don-vip
Message:

see #18273 - fix jvm detection in linux startup script

Location:
trunk/linux
Files:
2 edited

Legend:

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

    r15379 r15491  
    1010ARCH="`dpkg --print-architecture 2> /dev/null || true`"
    1111
     12JAVA_CMDS="$JAVA_HOME/bin/java"
     13
    1214# If OpenJDK is only available headless, do not try it
    13 if dpkg --get-selections 'openjdk-*-jre' | grep install$ > /dev/null ; then
    14         JAVA_CMDS="$JAVA_HOME/bin/java"
     15if dpkg --get-selections 'openjdk-*-jre' | grep install$ > /dev/null \
     16|| dpkg --get-selections 'openjdk-*-jre:$ARCH' | grep install$ > /dev/null ; then
    1517        # LTS versions in decreased order
    1618        JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-11-openjdk/bin/java /usr/lib/jvm/java-11-openjdk-$ARCH/bin/java"
     
    2325        # Development version
    2426        JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-14-openjdk/bin/java /usr/lib/jvm/java-14-openjdk-$ARCH/bin/java"
    25 else
    26         JAVA_CMDS="$JAVA_HOME/bin/java /usr/bin/java"
    2727fi
     28# Undetermined version
     29JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/default-java/bin/java /usr/bin/java"
    2830
    2931if [ -f /etc/default/josm-latest ]; then
  • trunk/linux/tested/usr/bin/josm

    r15379 r15491  
    1010ARCH="`dpkg --print-architecture 2> /dev/null || true`"
    1111
     12JAVA_CMDS="$JAVA_HOME/bin/java"
     13
    1214# If OpenJDK is only available headless, do not try it
    13 if dpkg --get-selections 'openjdk-*-jre' | grep install$ > /dev/null ; then
    14         JAVA_CMDS="$JAVA_HOME/bin/java"
     15if dpkg --get-selections 'openjdk-*-jre' | grep install$ > /dev/null \
     16|| dpkg --get-selections 'openjdk-*-jre:$ARCH' | grep install$ > /dev/null ; then
    1517        # LTS versions in decreased order
    1618        JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-11-openjdk/bin/java /usr/lib/jvm/java-11-openjdk-$ARCH/bin/java"
     
    2325        # Development version
    2426        JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-14-openjdk/bin/java /usr/lib/jvm/java-14-openjdk-$ARCH/bin/java"
    25 else
    26         JAVA_CMDS="$JAVA_HOME/bin/java /usr/bin/java"
    2727fi
     28# Undetermined version
     29JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/default-java/bin/java /usr/bin/java"
    2830
    2931if [ -f /etc/default/josm ]; then
Note: See TracChangeset for help on using the changeset viewer.