Linux安装Java和Maven

安装Jave8

1. 导入Webupd8 PPA

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

2. 安装

sudo apt-get install oracle-java8-installer
选择确认条款,用Tab键切换。

3. 设置为默认jdk

sudo apt install oracle-java8-set-default

4. 验证

$ java -version
java version "9"
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)

安装Maven

apt install maven
posted @ 2019-08-14 14:13  彼时岸边  阅读(335)  评论(0编辑  收藏  举报