

usr/lib/jvm/java-11-openjdk-amd64/bin/java If your computer use a java command in a different directory, the update-alternatives will not work. You must exclude the "real" java path from the $PATH variable. Probably you have made a change in your system that prevent update-alternatives to work.Īs I know, in a typical installation, the java command is a symbolic link in /usr/bin/java.

home/user9679/.sdkman/candidates/java/current/bin:/home/user9679/.sdkman/candidates/gradle I changed JAVA_HOME and PATH to use Java 11, but it still changed nothing: $ echo $PATH Then I switched, run java -version and have the same version as it was - Java 8: $ java -version Press to keep the current choice, or type selection number: 1īefore it I have used Java 8 and selection was set on /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java. * 0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto modeġ /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual modeĢ /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode There are 2 choices for the alternative java (providing /usr/bin/java). I'm using that command and have this output: $ sudo update-alternatives -config java I want to switch my java version with the command update-alternatives -config java, but I don't see any changes after that.
