Skip to content

Instantly share code, notes, and snippets.

Last active December 31, 2015 08:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Code for blog post, 'Updating Ubuntu with the Latest Java JDK':
# install and configure other java executable alternatives in manual mode
# install and update Java Web Start (javaws)
update-alternatives --display javaws
sudo update-alternatives --install /usr/bin/javaws javaws \
/usr/lib/jvm/jdk1.7.0_45/jre/bin/javaws 20000
update-alternatives --config javaws
# install and update Java Compiler (javac)
update-alternatives --display javac
sudo update-alternatives --install /usr/bin/javac javac \
/usr/lib/jvm/jdk1.7.0_45/bin/javac 20000
update-alternatives --config javac
# install and update Java Archive Tool (jar)
update-alternatives --display jar
sudo update-alternatives --install /usr/bin/jar jar \
/usr/lib/jvm/jdk1.7.0_45/bin/jar 20000
update-alternatives --config jar
# jar signing and verification tool (jarsigner)
update-alternatives --display jarsigner
sudo sudo update-alternatives --install /usr/bin/jarsigner jarsigner \
/usr/lib/jvm/jdk1.7.0_45/bin/jarsigner 20000
update-alternatives --config jarsigner
# install and update Java Archive Tool (javadoc)
update-alternatives --display javadoc
sudo update-alternatives --install /usr/bin/javadoc javadoc \
/usr/lib/jvm/jdk1.7.0_45/bin/javadoc 20000
update-alternatives --config javadoc
# install and update Java Plugin for Linux (
update-alternatives --display
sudo update-alternatives --install \
/usr/lib/mozilla/plugins/ \
/usr/lib/jvm/jdk1.7.0_45/jre/lib/amd64/ 20000
update-alternatives --config
# install and update Java disassembler (javap)
update-alternatives --display javap
sudo update-alternatives --install /usr/bin/javap javap \
/usr/lib/jvm/jdk1.7.0_45/bin/javap 20000
update-alternatives --config javap
# install and update file that creates C header files and C stub (javah)
update-alternatives --display javah
sudo update-alternatives --install /usr/bin/javah javah \
/usr/lib/jvm/jdk1.7.0_45/bin/javah 20000
update-alternatives --config javah
# jexec utility executes command inside the jail (jexec)
update-alternatives --display jexec
sudo update-alternatives --install /usr/bin/jexec jexec \
/usr/lib/jvm/jdk1.7.0_45/lib/jexec 20000
update-alternatives --config jexec
# install and update file to run applets without a web browser (appletviewer)
update-alternatives --display appletviewer
sudo update-alternatives --install /usr/bin/appletviewer appletviewer \
/usr/lib/jvm/jdk1.7.0_45/bin/appletviewer 20000
update-alternatives --config appletviewer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment