- Download jdk11 from https://download.java.net/openjdk/jdk11/ri/openjdk-11+28_linux-x64_bin.tar.gz
- Extract to /usr/lib/jvm
sudo tar xvf openjdk-11+28_linux-x64_bin.tar.gz --directory /usr/lib/jvm/
- sudo update-alternatives --config java
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/jdk-11/bin/java 3 auto mode
1 /usr/lib/jvm/java-7-oracle/jre/bin/java 1 manual mode
* 2 /usr/lib/jvm/java-8-oracle/jre/bin/java 2 manual mode
- Install java11 as 3 option
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-11/bin/javac 3
Set java11 as current java version
sudo update-alternatives --config java and select 3
sudo update-alternatives --config javac and select 3
No comments:
Post a Comment