Last active
November 11, 2020 23:08
-
-
Save uuklanger/87607b3b7b4765197660de237f926dbf to your computer and use it in GitHub Desktop.
Revisions
-
uuklanger revised this gist
Nov 11, 2020 . No changes.There are no files selected for viewing
-
uuklanger revised this gist
Nov 11, 2020 . 1 changed file with 10 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,10 +4,10 @@ # # Show if java, javac, or jar are already setup. Run these commands before running the rest # JDK_VERSION='jdk1.8.0_261' echo "===============================================================" echo " Processing Aternatives for "${JDK_VERSION} echo "===============================================================" echo "Querying current values" sudo update-alternatives --query java @@ -20,21 +20,23 @@ sudo update-alternatives --query jarsigner # echo "===============================================================" echo "Installing current values" echo "===============================================================" sudo update-alternatives --remove java /usr/lib/jvm/${JDK_VERSION}/bin/java sudo update-alternatives --remove javac /usr/lib/jvm/${JDK_VERSION}/bin/javac sudo update-alternatives --remove jar /usr/lib/jvm/${JDK_VERSION}/bin/jar sudo update-alternatives --remove keytool /usr/lib/jvm/${JDK_VERSION}/bin/keytool sudo update-alternatives --remove jarsigner /usr/lib/jvm/${JDK_VERSION}/bin/jarsigner # # Visually confirm (that means you) that java, javac, and jar are setup # echo "===============================================================" echo "Querying current values" echo "===============================================================" sudo update-alternatives --query java sudo update-alternatives --query javac sudo update-alternatives --query jar sudo update-alternatives --query keytool sudo update-alternatives --query jarsigner # # DONE # -
uuklanger revised this gist
Oct 28, 2020 . 1 changed file with 15 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,12 @@ # # Show if java, javac, or jar are already setup. Run these commands before running the rest # JDK_VERSION='jdk1.8.0_271' echo "===============================================================" echo "Processing Aternatives for "${JDK_VERSION} echo "===============================================================" echo "Querying current values" sudo update-alternatives --query java sudo update-alternatives --query javac sudo update-alternatives --query jar @@ -12,14 +18,18 @@ sudo update-alternatives --query jarsigner # # Setup alternatives so java, javac, and jar are in the path. Run what is missing based on above. # echo "===============================================================" echo "Installing current values" sudo update-alternatives --remove /usr/bin/java java /usr/lib/jvm/${JDK_VERSION}/bin/java sudo update-alternatives --remove /usr/bin/javac javac /usr/lib/jvm/${JDK_VERSION}/bin/javac sudo update-alternatives --remove /usr/bin/jar jar /usr/lib/jvm/${JDK_VERSION}/bin/jar sudo update-alternatives --remove /usr/bin/keytool keytool /usr/lib/jvm/${JDK_VERSION}/bin/keytool sudo update-alternatives --remove /usr/bin/jarsigner jarsigner /usr/lib/jvm/${JDK_VERSION}/bin/jarsigner # # Visually confirm (that means you) that java, javac, and jar are setup # echo "===============================================================" echo "Querying current values" sudo update-alternatives --query java sudo update-alternatives --query javac sudo update-alternatives --query jar -
uuklanger created this gist
Aug 3, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ # --------------------------------------------------------------- # If you are setting up a clean (never used) system, you can run this full batch # Otherwise, I suggest running this line by line (copy/paste). # # Show if java, javac, or jar are already setup. Run these commands before running the rest # sudo update-alternatives --query java sudo update-alternatives --query javac sudo update-alternatives --query jar sudo update-alternatives --query keytool sudo update-alternatives --query jarsigner # # Setup alternatives so java, javac, and jar are in the path. Run what is missing based on above. # sudo update-alternatives --remove java /usr/lib/jvm/jdk1.8.0_181/bin/java sudo update-alternatives --remove javac /usr/lib/jvm/jdk1.8.0_181/bin/javac sudo update-alternatives --remove jar /usr/lib/jvm/jdk1.8.0_181/bin/jar sudo update-alternatives --remove keytool /usr/lib/jvm/jdk1.8.0_181/bin/keytool sudo update-alternatives --remove jarsigner /usr/lib/jvm/jdk1.8.0_181/bin/jarsigner # # Visually confirm (that means you) that java, javac, and jar are setup # sudo update-alternatives --query java sudo update-alternatives --query javac sudo update-alternatives --query jar sudo update-alternatives --query keytool sudo update-alternatives --query jarsigner # # DONE #