Ubuntu18.04安装JDK 1.更新软件包列表 sudo apt-get update 2.安装openjdk-8-jdk sudo apt-get install openjdk-8-jdk 3.查看java版本,看看是否安装成功 java -version