Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Weather App (2015) Networking Getting the OkHttp Library Using Gradle

Sandro Meschiari
Sandro Meschiari
18,418 Points

i install java 8 but my mac keep saying that the version is 1.6 why??

i am taking a course to build the app android stormy, and i need to have on my mac the version 1.7 of java otherwise okhttp won't work, i install java 8 but when i go to terminal and ask for the version that is install on it answer that the version 1.6

3 Answers

Hi, you don't need java 8 to program android yet.

For change current version java in your mac see this link.

Steve Marreros Chuco
Steve Marreros Chuco
9,900 Points

Hello Sandro. It seems confusing that after installing JRE 8 we are still getting the older version. This is what I found in Oracle Documentation(https://docs.oracle.com/javase/8/docs/technotes/guides/install/mac_jre.html#CHDGECEB):

Determining the Installed Version of the JRE: /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version

After I copied and pasted that on the console, I got this result: java version "1.8.0_40" Java(TM) SE Runtime Environment (build 1.8.0_40-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

However, every time I type "java -version", I get this: java version "1.6.0_65" Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)

So far I think that we can have both Java versions in our computer.

Sandro Meschiari
Sandro Meschiari
18,418 Points

i uninstalled the java i had on my computer and reinstalled using the latest version and everything was ok. I'm using a mac and i spent all my life on windows so it is hard for me to understand why a simple update makes such a mess, but hey glad we both got it working!!