commit 0c9f557d31f28251f13b53a843b1e9eff009ac07 Author: 8ga Date: Fri Jan 10 11:09:33 2025 +0800 添加 ubuntu-jdk8.md diff --git a/ ubuntu-jdk8.md b/ ubuntu-jdk8.md new file mode 100644 index 0000000..745f96a --- /dev/null +++ b/ ubuntu-jdk8.md @@ -0,0 +1,32 @@ +下载解压安装包 +``` +cd /usr/local +``` +``` +wget https://mirrors.huaweicloud.com/java/jdk/8u202-b08/jdk-8u202-linux-x64.tar.gz +``` +``` +tar -zvxf jdk-8u202-linux-x64.tar.gz +``` + +配置环境变量 +``` +vim /etc/profile +``` + +复制粘贴 +``` +export JAVA_HOME=/usr/local/jdk1.8.0_202 +export CLASSPATH=$:CLASSPATH:$JAVA_HOME/lib/ +export PATH=$PATH:$JAVA_HOME/bin +``` + +刷新 +``` +source /etc/profile +``` + +验证 +``` +java -version +``` \ No newline at end of file