From 0c9f557d31f28251f13b53a843b1e9eff009ac07 Mon Sep 17 00:00:00 2001 From: 8ga Date: Fri, 10 Jan 2025 11:09:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=20ubuntu-jdk8.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ubuntu-jdk8.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 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