How to install openjdk-11.0.16 version in amazon linux 2

0

I have to install a specific version of openjdk i.e, openjdk-11.0.16 in amazon linux 2. I don't want to install coretto11. we can install using amazon-linux-extras install java-openjdk11, but this approach always installs the latest version and not the specific version I require.

How to achieve this?

gefragt vor einem Jahr256 Aufrufe
1 Antwort
0

HI,I used this step install openjdk-11-0.16 version in amz 2

wget https://builds.openlogic.com/downloadJDK/openlogic-openjdk-jre/11.0.16+8/openlogic-openjdk-jre-11.0.16+8-linux-x64.tar.gz
mv openlogic-openjdk-jre-11.0.16+8-linux-x64 /usr/jdk-11.0.16
# add this to your /etc/profile
export JAVA_HOME=/usr/jdk-11.0.16
export PATH=$PATH:$JAVA_HOME/bin

# then,you just source this env

source /etc/profile

# check the java version

[root@ip-172-31-23-10 ~]# java -version
openjdk version "11.0.16" 2022-07-19
OpenJDK Runtime Environment OpenLogic-OpenJDK (build 11.0.16+8-adhoc.root.jdk11u)
OpenJDK 64-Bit Server VM OpenLogic-OpenJDK (build 11.0.16+8-adhoc.root.jdk11u, mixed mode)

I hope this can help you,hava a nice day!

在此处输入图片描述

beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen