Created
July 18, 2022 02:46
-
-
Save apzentral/077fe8c8d4ff03962a29fc2c0bf5d44f to your computer and use it in GitHub Desktop.
Install java script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
JAVA_VERSION=jdk1.8.0_05 | |
JAVA_FILE_NAME="jdk-8u5-linux-i586.tar.gz" | |
sudo tar xvzf "${JAVA_FILE_NAME}" -C /usr/java | |
JAVA_HOME="/usr/java/${JAVA_VERSION}/" | |
sudo update-alternatives --install /usr/bin/java java ${JAVA_HOME%*/}/bin/java 20000 | |
sudo update-alternatives --install /usr/bin/javac javac ${JAVA_HOME%*/}/bin/javac 20000 | |
update-alternatives --config java |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment