Update alternatives java7/15/2023 ![]() ![]() My question is, what does sudo update-alternatives -config java exactly do after switching to another alternative with respect to the settings in the $JAVA_HOME$ variable? Now, the command sudo update-alternatives -config java drops down the list of all Java versions being installed like that: 0 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 auto modeġ /opt/jdk1.7.0_51/bin/java 1 manual modeģ /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual modeĤ /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 manual modeīut switching between these using the prompt of the sudo update-alternatives -config java does not affect $JAVA_HOME and then $java -version. ![]() >Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)Īt the first glance, the command sudo update-alternatives -config java was not showing my manually installed Java, so I installed it to the command with sudo update-alternatives -install /usr/bin/java java /opt/jdk1.8.0_91 1. >Java(TM) SE Runtime Environment (build 1.8.0_91-b14) I am on Ubuntu and I have set the following in my ~/.bashrc file: export JAVA_HOME=/opt/jdk1.8.0_91 ![]()
0 Comments
Leave a Reply. |