Install maven and Java SE Development Kit

I use the script install-java8jdk.sh to install maven and Java Development Kit. To enable installation of JDK without prompt for license agreement the below command is issued

sudo debconf-set-selections <<<'debconf shared/accepted-oracle-license-v1-1 select true'

The installation can be checked with the command ‘mvn -v‘ which will result in an output like:

vagrant@ubuntu:~$ mvn -v
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_91, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-87-generic", arch: "amd64", family: "unix"

Leave a Reply

Your email address will not be published. Required fields are marked *