更新 ubuntu-jdk8.sh

This commit is contained in:
8ga 2025-01-10 13:51:15 +08:00
parent 82f406df93
commit f185ef67ef

View File

@ -1,15 +1,9 @@
#!/bin/bash #!/bin/bash
cd /usr/local cd /usr/local
wget https://mirrors.huaweicloud.com/java/jdk/8u202-b08/jdk-8u202-linux-x64.tar.gz wget https://mirrors.huaweicloud.com/java/jdk/8u202-b08/jdk-8u202-linux-x64.tar.gz
tar -zvxf jdk-8u202-linux-x64.tar.gz tar -zvxf jdk-8u202-linux-x64.tar.gz
echo "export JAVA_HOME=/usr/local/jdk1.8.0_202" | tee -a /etc/profile echo "export JAVA_HOME=/usr/local/jdk1.8.0_202" | tee -a /etc/profile
echo "export CLASSPATH=$:CLASSPATH:$JAVA_HOME/lib/" | tee -a /etc/profile echo "export CLASSPATH=$:CLASSPATH:$JAVA_HOME/lib/" | tee -a /etc/profile
echo "export PATH=$PATH:$JAVA_HOME/bin" | tee -a /etc/profile echo "export PATH=$PATH:$JAVA_HOME/bin" | tee -a /etc/profile
source /etc/profile source /etc/profile
java -version java -version