Created
July 16, 2012 21:22
-
-
Save ryanobjc/3125148 to your computer and use it in GitHub Desktop.
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 | |
VERS=$1 | |
cat > java-post.sh <<EOF | |
#!/bin/sh | |
set -e | |
for i in java javac jps jstack jmap ; do | |
update-alternatives --install /usr/bin/\$i \$i /usr/lib/jvm/$VERS/bin/\$i 1 | |
done | |
ln -sf /usr/lib/jvm/$VERS /usr/lib/jvm/default-java | |
ln -sf /usr/lib/jvm/$VERS /usr/lib/jvm/java-6-sun | |
exit 0 | |
EOF | |
chmod +x java-post.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment