Ubuntu 24.04 安装 JDK 21
1. 下载 jdk
cd /tmp
wget https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz
2. 解压 jdk
sudo mkdir /u01
cd /u01
unzip /tmp/jdk-21_linux-x64_bin.tar.gz
mv jdk-21.0.5/ jdk
3. 设置环境变量
vi ~/.bashrc
---
export JAVA_HOME=/u01/jdk
export PATH=$JAVA_HOME/bin:$PATH
---
source ~/.bashrc
完结!
原文地址:https://blog.csdn.net/engchina/article/details/143772569
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!