Antwort: Re: Maven JAVA_HOME

2018-03-21 Thread thorsten . heit
Hi,

> Preston, Dale wrote on 2018-03-20 11:13:
> 
> > On my server, I have JAVA_HOME set to jdk1.8.0_161.0.  When I execute 
echo
> > $JAVA_HOME, it shows the right path to my jdk1.8.0_161.0.  When I run 
java
> > -version, it shows the right version 8 as well.
> > 
> > When I run maven -version, it shows this:
> > 
> > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297;
> > 2018-02-24T13:49:05-06:00)
> > Maven home: /opt/maven/latest
> > Java version: 1.8.0_161, vendor: Oracle Corporation
> > Java home: /usr/lib/jvm/jdk1.7.0_79/jre
> > 
> > Note the Java home path to the wrong version but Java version shows 
the right
> > version.
> > 
> > Any tips on where Maven is getting that jdk1.7.0_79/jre path?

On at least Linux the Oracle JDK installs a few files under /etc/profile.d 
to system-wide predefine some environment variables when you log in, 
depending on the shell you're using...


HTH

Thorsten

Re: Maven JAVA_HOME

2018-03-20 Thread Manfred Moser
You probably want to make sure the operating system JDK is the same. Depending 
on OS that is different .. 

Manfred

Preston, Dale wrote on 2018-03-20 11:13:

> On my server, I have JAVA_HOME set to jdk1.8.0_161.0.  When I execute echo
> $JAVA_HOME, it shows the right path to my jdk1.8.0_161.0.  When I run java
> -version, it shows the right version 8 as well.
> 
> When I run maven -version, it shows this:
> 
> Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297;
> 2018-02-24T13:49:05-06:00)
> Maven home: /opt/maven/latest
> Java version: 1.8.0_161, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/jdk1.7.0_79/jre
> 
> Note the Java home path to the wrong version but Java version shows the right
> version.
> 
> Any tips on where Maven is getting that jdk1.7.0_79/jre path?
> 
> 


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Maven JAVA_HOME

2018-03-20 Thread Preston, Dale
On my server, I have JAVA_HOME set to jdk1.8.0_161.0.  When I execute echo 
$JAVA_HOME, it shows the right path to my jdk1.8.0_161.0.  When I run java 
-version, it shows the right version 8 as well.

When I run maven -version, it shows this:

Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 
2018-02-24T13:49:05-06:00)
Maven home: /opt/maven/latest
Java version: 1.8.0_161, vendor: Oracle Corporation
Java home: /usr/lib/jvm/jdk1.7.0_79/jre

Note the Java home path to the wrong version but Java version shows the right 
version.

Any tips on where Maven is getting that jdk1.7.0_79/jre path?