sh/java-home.sh
2025-01-10 14:52:12 +08:00

5 lines
190 B
Bash

#!/bin/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