I face the same problem and solved by adding the JAVA_HOME variable with updated version of java in my Ubuntu Machine(16.04).
if you are using "Apache Maven 3.3.9" You need to upgrade your JAVA_HOME with java7 or more
Step to Do this
1-sudo vim /etc/environment
2-JAVA_HOME=JAVA Installation Directory (MyCase-/opt/dev/jdk1.7.0_45/)
3-Run echo $JAVA_HOME will give the JAVA_HOME set value
4-Now mvn -version will give the desired output
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: /opt/dev/jdk1.7.0_45/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-36-generic", arch: "amd64", family: "unix"
No comments:
Post a Comment