Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

I upgraded to JDK 8 but my atlas-version still shows JDK 1.6

MattS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2015

Somehow the maven in the freshly re-installed SDK 5.0.13 is not picking up the new JDK 1.8.0_45 on my OSX box. Any clues for where to set JAVA_HOME or which mvn to update or something?

 

[mdoar@mdoar2 ~]$ atlas-version
ATLAS Version:    5.0.13
ATLAS Home:       /usr/share/atlassian-plugin-sdk-5.0.13
ATLAS Scripts:    /usr/share/atlassian-plugin-sdk-5.0.13/bin
ATLAS Maven Home: /usr/share/atlassian-plugin-sdk-5.0.13/apache-maven-3.2.1
--------
Executing: /usr/share/atlassian-plugin-sdk-5.0.13/apache-maven-3.2.1/bin/mvn --version -gs /usr/share/atlassian-plugin-sdk-5.0.13/apache-maven-3.2.1/conf/settings.xml
Colorizing console...
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T09:37:52-08:00)
Maven home: /usr/share/atlassian-plugin-sdk-5.0.13/apache-maven-3.2.1
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.7.5", arch: "x86_64", family: "mac"
[mdoar@mdoar2 ~]$ which mvn
/usr/bin/mvn
[mdoar@mdoar2 ~]$ mvn -version
Apache Maven 3.0.3 (r1075438; 2011-02-28 09:31:09-0800)
Maven home: /usr/share/maven
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.7.5", arch: "x86_64", family: "mac"
[mdoar@mdoar2 ~]$

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
MattS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2015

Turns out that on my machine

/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK

was a soft link to

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents

I removed the softlink and atlas-version worked as expected. Odd!

MattS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2015

And I also had to tweak my pom.xml to <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin>

Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 1, 2015

That helped. Instead of removing, I changed it to the 1.8 path {{sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK}}

0 votes
rrudnicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 13, 2015

What is the return of javac -version? 

If this is 1.6, check your .bashrc_profile and them add the following lines:

 

JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.8.0.jdk/Contents/Home

export JAVA_HOME

export PATH=$PATH:$JAVA_HOME/bin

 

After that, logout from your shell and login again. Then, you can check your java version again:

javac -version

 

On these links there’re more details:

https://developer.atlassian.com/display/DOCS/Set+up+the+SDK+Prerequisites+for+Linux+or+Mac

and

https://developer.atlassian.com/docs/developer-tools/working-with-the-sdk/changing-the-default-maven-version

 

Hope this helps

 

Regards

Renato Rudnicki

MattS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2015

[mdoar@mdoar2 ~]$ javac -version javac 1.8.0_45 Java is fine I think. mvn seems fine too. The problem seems to be the atlas-sdk mvn that is not picking up the new JDK.

TAGS
AUG Leaders

Atlassian Community Events