答案1
使用以下命令轻松安装 .deb 文件gdebi-gtk
现在,下面,注意路径,jdk-14.0.1
可能会有所不同:
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-14.0.1/bin/java 2
sudo update-alternatives --config java # select it now
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-14.0.1/bin/javac 2
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-14.0.1/bin/jar 2
sudo update-alternatives --set javac /usr/lib/jvm/jdk-14.0.1/bin/javac
sudo update-alternatives --set jar /usr/lib/jvm/jdk-14.0.1/bin/jar
java -version;javac -version #confirm it
根据以下信息: https://websiteforstudents.com/how-to-manually-install-oracle-java-14-on-ubuntu-18-04-16-04/