From 6acf27908507ab2b7225bbf61452acf14a6b1a0b Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Wed, 15 Jul 2020 11:01:23 +0200 Subject: [PATCH] setup: we no longer need Java 8 However, Java 11 or 14 depending on the Ubuntu version are just fine. --- Tools/setup/ubuntu.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Tools/setup/ubuntu.sh b/Tools/setup/ubuntu.sh index a0775ba41b..157aae6a6b 100755 --- a/Tools/setup/ubuntu.sh +++ b/Tools/setup/ubuntu.sh @@ -175,15 +175,22 @@ if [[ $INSTALL_SIM == "true" ]]; then bc \ ; - # Java 8 (jmavsim or fastrtps) + if [[ "${UBUNTU_RELEASE}" == "18.04" ]]; then + java_version=11 + elif [[ "${UBUNTU_RELEASE}" == "20.04" ]]; then + java_version=14 + else + java_version=14 + fi + # Java (jmavsim or fastrtps) sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \ ant \ - openjdk-8-jre \ - openjdk-8-jdk \ + openjdk-$java_version-jre \ + openjdk-$java_version-jdk \ ; - # Set Java 8 as default - sudo update-alternatives --set java $(update-alternatives --list java | grep "java-8") + # Set Java 11 as default + sudo update-alternatives --set java $(update-alternatives --list java | grep "java-$java_version") # Gazebo sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'