今天,oracle发布了JDK 19,如何在Ubuntu 22.04 LTS上安装JDK 19?
答案1
命令
wget https://download.oracle.com/java/19/latest/jdk-19_linux-x64_bin.deb
sudo apt-get -qqy install ./jdk-19_linux-x64_bin.deb
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-19/bin/java 1919
检查结果
root@vypc:~# java -version
java version "19" 2022-09-20
Java(TM) SE Runtime Environment (build 19+36-2238)
Java HotSpot(TM) 64-Bit Server VM (build 19+36-2238, mixed mode, sharing)
看https://ubuntuhandbook.org/index.php/2022/03/install-jdk-18-ubuntu/