java:installjdk8alternativesubuntu
This is an old revision of the document!
Install jdk 8 in ubuntu with alternatives
Install directory of our version of java: /usr/lib/jvm/jdk1.8.0_20
Create a file .java-1.8.0.20-oracle.jinfo
Create a file .java-1.8.0.20-oracle.jinfo
with the following content:
alias=java-8-oracle priority=100 section=non-free jre ControlPanel /usr/lib/jvm/jdk1.8.0_20/jre/bin/ControlPanel jre java /usr/lib/jvm/jdk1.8.0_20/jre/bin/java jre javaws /usr/lib/jvm/jdk1.8.0_20/jre/bin/javaws jre jcontrol /usr/lib/jvm/jdk1.8.0_20/jre/bin/jcontrol jre jjs /usr/lib/jvm/jdk1.8.0_20/jre/bin/jjs jre keytool /usr/lib/jvm/jdk1.8.0_20/jre/bin/keytool jre orbd /usr/lib/jvm/jdk1.8.0_20/jre/bin/orbd jre pack200 /usr/lib/jvm/jdk1.8.0_20/jre/bin/pack200 jre policytool /usr/lib/jvm/jdk1.8.0_20/jre/bin/policytool jre rmid /usr/lib/jvm/jdk1.8.0_20/jre/bin/rmid jre rmiregistry /usr/lib/jvm/jdk1.8.0_20/jre/bin/rmiregistry jre servertool /usr/lib/jvm/jdk1.8.0_20/jre/bin/servertool jre tnameserv /usr/lib/jvm/jdk1.8.0_20/jre/bin/tnameserv jre unpack200 /usr/lib/jvm/jdk1.8.0_20/jre/bin/unpack200 jdk appletviewer /usr/lib/jvm/jdk1.8.0_20/bin/appletviewer jdk ControlPanel /usr/lib/jvm/jdk1.8.0_20/bin/ControlPanel jdk extcheck /usr/lib/jvm/jdk1.8.0_20/bin/extcheck jdk idlj /usr/lib/jvm/jdk1.8.0_20/bin/idlj jdk jar /usr/lib/jvm/jdk1.8.0_20/bin/jar jdk jarsigner /usr/lib/jvm/jdk1.8.0_20/bin/jarsigner jdk java /usr/lib/jvm/jdk1.8.0_20/bin/java jdk javac /usr/lib/jvm/jdk1.8.0_20/bin/javac jdk javadoc /usr/lib/jvm/jdk1.8.0_20/bin/javadoc jdk javafxpackager /usr/lib/jvm/jdk1.8.0_20/bin/javafxpackager jdk javah /usr/lib/jvm/jdk1.8.0_20/bin/javah jdk javap /usr/lib/jvm/jdk1.8.0_20/bin/javap jdk javapackager /usr/lib/jvm/jdk1.8.0_20/bin/javapackager jdk java-rmi.cgi /usr/lib/jvm/jdk1.8.0_20/bin/java-rmi.cgi jdk javaws /usr/lib/jvm/jdk1.8.0_20/bin/javaws jdk jcmd /usr/lib/jvm/jdk1.8.0_20/bin/jcmd jdk jconsole /usr/lib/jvm/jdk1.8.0_20/bin/jconsole jdk jcontrol /usr/lib/jvm/jdk1.8.0_20/bin/jcontrol jdk jdb /usr/lib/jvm/jdk1.8.0_20/bin/jdb jdk jdeps /usr/lib/jvm/jdk1.8.0_20/bin/jdeps jdk jhat /usr/lib/jvm/jdk1.8.0_20/bin/jhat jdk jinfo /usr/lib/jvm/jdk1.8.0_20/bin/jinfo jdk jjs /usr/lib/jvm/jdk1.8.0_20/bin/jjs jdk jmap /usr/lib/jvm/jdk1.8.0_20/bin/jmap jdk jmc /usr/lib/jvm/jdk1.8.0_20/bin/jmc jdk jmc.ini /usr/lib/jvm/jdk1.8.0_20/bin/jmc.ini jdk jps /usr/lib/jvm/jdk1.8.0_20/bin/jps jdk jrunscript /usr/lib/jvm/jdk1.8.0_20/bin/jrunscript jdk jsadebugd /usr/lib/jvm/jdk1.8.0_20/bin/jsadebugd jdk jstack /usr/lib/jvm/jdk1.8.0_20/bin/jstack jdk jstat /usr/lib/jvm/jdk1.8.0_20/bin/jstat jdk jstatd /usr/lib/jvm/jdk1.8.0_20/bin/jstatd jdk jvisualvm /usr/lib/jvm/jdk1.8.0_20/bin/jvisualvm jdk keytool /usr/lib/jvm/jdk1.8.0_20/bin/keytool jdk native2ascii /usr/lib/jvm/jdk1.8.0_20/bin/native2ascii jdk orbd /usr/lib/jvm/jdk1.8.0_20/bin/orbd jdk pack200 /usr/lib/jvm/jdk1.8.0_20/bin/pack200 jdk policytool /usr/lib/jvm/jdk1.8.0_20/bin/policytool jdk rmic /usr/lib/jvm/jdk1.8.0_20/bin/rmic jdk rmid /usr/lib/jvm/jdk1.8.0_20/bin/rmid jdk rmiregistry /usr/lib/jvm/jdk1.8.0_20/bin/rmiregistry jdk schemagen /usr/lib/jvm/jdk1.8.0_20/bin/schemagen jdk serialver /usr/lib/jvm/jdk1.8.0_20/bin/serialver jdk servertool /usr/lib/jvm/jdk1.8.0_20/bin/servertool jdk tnameserv /usr/lib/jvm/jdk1.8.0_20/bin/tnameserv jdk unpack200 /usr/lib/jvm/jdk1.8.0_20/bin/unpack200 jdk wsgen /usr/lib/jvm/jdk1.8.0_20/bin/wsgen jdk wsimport /usr/lib/jvm/jdk1.8.0_20/bin/wsimport jdk xjc /usr/lib/jvm/jdk1.8.0_20/bin/xjc plugin xulrunner-1.9-javaplugin.so /usr/lib/jvm/jdk1.8.0_20/jre/lib/amd64/libnpjp2.so plugin mozilla-javaplugin.so /usr/lib/jvm/jdk1.8.0_20/jre/lib/amd64/libnpjp2.so
The commands for update alternatives:
update-alternatives --quiet --install /usr/bin/policytool policytool /usr/lib/jvm/jdk1.8.0_20/jre/bin/policytool 100 update-alternatives --quiet --install /usr/bin/rmid rmid /usr/lib/jvm/jdk1.8.0_20/jre/bin/rmid 100 update-alternatives --quiet --install /usr/bin/unpack200 unpack200 /usr/lib/jvm/jdk1.8.0_20/jre/bin/unpack200 100 update-alternatives --quiet --install /usr/bin/appletviewer appletviewer /usr/lib/jvm/jdk1.8.0_20/bin/appletviewer 100 update-alternatives --quiet --install /usr/bin/ControlPanel ControlPanel /usr/lib/jvm/jdk1.8.0_20/bin/ControlPanel 100 update-alternatives --quiet --install /usr/bin/extcheck extcheck /usr/lib/jvm/jdk1.8.0_20/bin/extcheck 100 update-alternatives --quiet --install /usr/bin/idlj idlj /usr/lib/jvm/jdk1.8.0_20/bin/idlj 100 update-alternatives --quiet --install /usr/bin/jar jar /usr/lib/jvm/jdk1.8.0_20/bin/jar 100 update-alternatives --quiet --install /usr/bin/jarsigner jarsigner /usr/lib/jvm/jdk1.8.0_20/bin/jarsigner 100 update-alternatives --quiet --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_20/bin/java 100 update-alternatives --quiet --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_20/bin/javac 100 update-alternatives --quiet --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.8.0_20/bin/javadoc 100 update-alternatives --quiet --install /usr/bin/javafxpackager javafxpackager /usr/lib/jvm/jdk1.8.0_20/bin/javafxpackager 100 update-alternatives --quiet --install /usr/bin/javah javah /usr/lib/jvm/jdk1.8.0_20/bin/javah 100 update-alternatives --quiet --install /usr/bin/javap javap /usr/lib/jvm/jdk1.8.0_20/bin/javap 100 update-alternatives --quiet --install /usr/bin/javapackager javapackager /usr/lib/jvm/jdk1.8.0_20/bin/javapackager 100 update-alternatives --quiet --install /usr/bin/java-rmi.cgi java-rmi.cgi /usr/lib/jvm/jdk1.8.0_20/bin/java-rmi.cgi 100 update-alternatives --quiet --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.8.0_20/bin/javaws 100 update-alternatives --quiet --install /usr/bin/jcmd jcmd /usr/lib/jvm/jdk1.8.0_20/bin/jcmd 100 update-alternatives --quiet --install /usr/bin/jconsole jconsole /usr/lib/jvm/jdk1.8.0_20/bin/jconsole 100 update-alternatives --quiet --install /usr/bin/jcontrol jcontrol /usr/lib/jvm/jdk1.8.0_20/bin/jcontrol 100 update-alternatives --quiet --install /usr/bin/jdb jdb /usr/lib/jvm/jdk1.8.0_20/bin/jdb 100 update-alternatives --quiet --install /usr/bin/jdeps jdeps /usr/lib/jvm/jdk1.8.0_20/bin/jdeps 100 update-alternatives --quiet --install /usr/bin/jhat jhat /usr/lib/jvm/jdk1.8.0_20/bin/jhat 100 update-alternatives --quiet --install /usr/bin/jinfo jinfo /usr/lib/jvm/jdk1.8.0_20/bin/jinfo 100 update-alternatives --quiet --install /usr/bin/jjs jjs /usr/lib/jvm/jdk1.8.0_20/bin/jjs 100 update-alternatives --quiet --install /usr/bin/jmap jmap /usr/lib/jvm/jdk1.8.0_20/bin/jmap 100 update-alternatives --quiet --install /usr/bin/jmc jmc /usr/lib/jvm/jdk1.8.0_20/bin/jmc 100 update-alternatives --quiet --install /usr/bin/jps jps /usr/lib/jvm/jdk1.8.0_20/bin/jps 100 update-alternatives --quiet --install /usr/bin/jrunscript jrunscript /usr/lib/jvm/jdk1.8.0_20/bin/jrunscript 100 update-alternatives --quiet --install /usr/bin/jsadebugd jsadebugd /usr/lib/jvm/jdk1.8.0_20/bin/jsadebugd 100 update-alternatives --quiet --install /usr/bin/jstack jstack /usr/lib/jvm/jdk1.8.0_20/bin/jstack 100 update-alternatives --quiet --install /usr/bin/jstat jstat /usr/lib/jvm/jdk1.8.0_20/bin/jstat 100 update-alternatives --quiet --install /usr/bin/jstatd jstatd /usr/lib/jvm/jdk1.8.0_20/bin/jstatd 100 update-alternatives --quiet --install /usr/bin/jvisualvm jvisualvm /usr/lib/jvm/jdk1.8.0_20/bin/jvisualvm 100 update-alternatives --quiet --install /usr/bin/keytool keytool /usr/lib/jvm/jdk1.8.0_20/bin/keytool 100 update-alternatives --quiet --install /usr/bin/native2ascii native2ascii /usr/lib/jvm/jdk1.8.0_20/bin/native2ascii 100 update-alternatives --quiet --install /usr/bin/orbd orbd /usr/lib/jvm/jdk1.8.0_20/bin/orbd 100 update-alternatives --quiet --install /usr/bin/pack200 pack200 /usr/lib/jvm/jdk1.8.0_20/bin/pack200 100 update-alternatives --quiet --install /usr/bin/policytool policytool /usr/lib/jvm/jdk1.8.0_20/bin/policytool 100 update-alternatives --quiet --install /usr/bin/rmic rmic /usr/lib/jvm/jdk1.8.0_20/bin/rmic 100 update-alternatives --quiet --install /usr/bin/rmid rmid /usr/lib/jvm/jdk1.8.0_20/bin/rmid 100 update-alternatives --quiet --install /usr/bin/rmiregistry rmiregistry /usr/lib/jvm/jdk1.8.0_20/bin/rmiregistry 100 update-alternatives --quiet --install /usr/bin/schemagen schemagen /usr/lib/jvm/jdk1.8.0_20/bin/schemagen 100 update-alternatives --quiet --install /usr/bin/serialver serialver /usr/lib/jvm/jdk1.8.0_20/bin/serialver 100 update-alternatives --quiet --install /usr/bin/servertool servertool /usr/lib/jvm/jdk1.8.0_20/bin/servertool 100 update-alternatives --quiet --install /usr/bin/tnameserv tnameserv /usr/lib/jvm/jdk1.8.0_20/bin/tnameserv 100 update-alternatives --quiet --install /usr/bin/unpack200 unpack200 /usr/lib/jvm/jdk1.8.0_20/bin/unpack200 100 update-alternatives --quiet --install /usr/bin/wsgen wsgen /usr/lib/jvm/jdk1.8.0_20/bin/wsgen 100 update-alternatives --quiet --install /usr/bin/wsimport wsimport /usr/lib/jvm/jdk1.8.0_20/bin/wsimport 100 update-alternatives --quiet --install /usr/bin/xjc xjc /usr/lib/jvm/jdk1.8.0_20/bin/xjc 100
and don't forget the alljava.csh and alljava.sh (see java7onlinux)
java/installjdk8alternativesubuntu.1412116835.txt.gz · Last modified: 2022/12/02 21:02 (external edit)