Created
August 13, 2014 09:11
-
-
Save SalomonBrys/ffff5da9523fc15cc18d to your computer and use it in GitHub Desktop.
jdk-update-alternatives
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
#!/bin/sh | |
JHOME=$(pwd) | |
for jbin in jar java javac javadoc javah javap javaws jvisualvm keytool; do | |
if [ ! -x $JHOME/bin/$jbin ]; then | |
echo "ERROR: Cannot find: $JHOME/bin/$jbin" | |
else | |
update-alternatives --install "/usr/bin/$jbin" "$jbin" "$JHOME/bin/$jbin" 1 | |
update-alternatives --set "$jbin" "$JHOME/bin/$jbin" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment