Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Code for blog post, 'Updating Ubuntu with the Latest Java JDK': http://wp.me/p1RD28-Wq
# 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 (mozilla-javaplugin.so)
update-alternatives --display mozilla-javaplugin.so
sudo update-alternatives --install \
/usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so \
/usr/lib/jvm/jdk1.7.0_45/jre/lib/amd64/libnpjp2.so 20000
update-alternatives --config mozilla-javaplugin.so
# 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