sh/ubuntu-java-home.sh
2025-01-10 14:50:46 +08:00

4 lines
178 B
Bash

echo "export JAVA_HOME=/usr/local/jdk1.8.0_202" | tee -a /etc/profile
echo "export PATH=$PATH:/usr/local/jdk1.8.0_202/bin" | tee -a /etc/profile
source /etc/profile
java -version