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?

已提問 13 天前檢視次數 9 次
1 個回答
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!

在此处输入图片描述

已回答 13 天前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南