Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
20
rated 0 times [  20] [ 0]  / answers: 1 / hits: 14936  / 2 Years ago, wed, march 23, 2022, 3:25:13

I wanted to install Temurin JDK both 8 and 11, I installed them by these steps


wget https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u312-b07/OpenJDK8U-jdk_x64_linux_hotspot_8u312b07.tar.gz
tar xzf OpenJDK8U-jdk_x64_linux_hotspot_8u312b07.tar.gz

sudo mv jdk8u312-b07/ /usr/lib/jvm/temurinjdk-8-hotspot-amd64

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/temurinjdk-8-hotspot-amd64/bin/java" 1081
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/temurinjdk-8-hotspot-amd64/bin/javac" 1081

But I am not sure if this is 100% right and how do I generate .jinfo file is that even needed?


More From » java

 Answers
7

You can use the Adoptium Debian / Ubuntu repository



  1. Add the Eclipse Adoptium GPG key


    wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | sudo apt-key add -


  2. Add the Eclipse Adoptium apt repository


    echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list


  3. Install the Temurin version you require


    sudo apt update # update if you haven't already
    sudo apt install temurin-8-jdk
    sudo apt install temurin-17-jdk


  4. Configure the default version


    sudo update-alternatives --config java



[#1011] Wednesday, March 23, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
listeerrated

Total Points: 354
Total Questions: 112
Total Answers: 100

Location: Guam
Member since Fri, Jun 18, 2021
3 Years ago
listeerrated questions
Wed, Jun 8, 22, 11:43, 2 Years ago
Wed, Jun 2, 21, 20:28, 3 Years ago
;