erltd.blogg.se

Update alternatives java
Update alternatives java






update alternatives java

# extract a jdk file named `jdk-8u65-linux-圆4.tar.gz` from current directory to `/usr/lib/jvm` JAVA_DIR is the path to your extracted jdk folder. Modify the jdk file name and JAVA_DIR to suit your need. I use this script to to extract a downloaded jdk, and use update-alternatives to fully set it. A package does provide these information of it's alternatives in /usr/lib/jvm/.jinfo.Īll the jdk tools are appletviewer extcheck idlj jar jarsigner javac javadoc javah javap jconsole jdb jhat jinfo jmap jps jrunscript jsadebugd jstack jstat jstatd native2ascii rmic schemagen serialver wsgen wsimport xjc Update-java-alternatives updates all alternatives belonging to one runtime or development kit for the Java language. The purpose of the update-java-alternatives as described in the manual page is You can get more help by using the command man update-alternatives or you can see the manual in your browser here Sudo update-alternatives -config jcontrol Sudo update-alternatives -install /usr/bin/jexec jexec /media/mydisk/jdk/jre/lib/jexec 100 -slave /usr/share/binfmts/jar jexec-binfmt media/mydisk/jdk/jre/lib/javawsĪnd then you can use these command to set as default. Sudo update-alternatives -install /usr/bin/jexec jexec /media/mydisk/jdk/jre/lib/jexec 100 Sudo update-alternatives -install /usr/bin/jcontrol jcontrol /media/mydisk/jdk/bin/jcontrol 100 Sudo update-alternatives -install /usr/bin/java_vm java_vm /media/mydisk/jdk/bin/java_vm 100

update alternatives java

Sudo update-alternatives -install /usr/bin/javac javac /media/mydisk/jdk/bin/javac 100 (Check the link below for updated complete update-alternatives script) sudo update-alternatives -install /usr/bin/java java /media/mydisk/jdk/bin/java 100 I actually use these commands to install jdk1.6.0_25. For Java 9, you have to add jcmd, jjs, jdeps and jshell to the Java 6 list.For Java 8, you have to add jcmd, jjs and jdeps to the Java 6 list.For Java 7, you have to add jcmd to the Java 6 list.The command update-java-alternatives sets alternatives for java components and it seems to use update-alternatives for this. These components are appletviewer, extcheck, idlj, jar, jarsigner, java, javac, javadoc, javah, javap, javaws, jconsole, jdb, jexec, jhat, jinfo, jmap, jps, jrunscript, jsadebugd, jstack, jstat, jstatd, keytool, mozilla-javaplugin.so, native2ascii, orbd, pack200, policytool, rmic, rmid, rmiregistry, schemagen, serialver, servertool, tnameserv, unpack200, wsgen, wsimport, xjc.įor further information, you can see the man pages for update-alternatives : man update-alternatives. You have to do this for other jdk components too. # Setting the new alternative as default for "java". Sudo update-alternatives -install /usr/bin/java java /media/mydisk/jdk/bin/java 1 You can do this with sudo update-alternatives : # Adding a new alternative for "java".








Update alternatives java