Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Update system java to jdk8
## JDK=$(cd /usr/java/jdk1.8* && pwd)
update-alternatives \
--install /usr/bin/java java $JDK/jre/bin/java 18000 \
--slave /usr/lib/jvm/jre jre $JDK/jre \
--slave /usr/bin/javac javac $JDK/bin/javac \
--slave /usr/bin/javah javah $JDK/bin/javah \
--slave /usr/bin/javap javap $JDK/bin/javap \
--slave /usr/bin/jar jar $JDK/bin/jar \
--slave /usr/bin/jarsigner jarsigner $JDK/bin/jarsigner \
--slave /usr/bin/jmap jmap $JDK/bin/jmap \
--slave /usr/bin/keytool keytool $JDK/bin/keytool \
--slave /usr/bin/javadoc javadoc $JDK/bin/javadoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment