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

Java

is it normal for my java compiler to be a different version than my actual java version?

In my command prompt when I type:

java -version

It tells me that I have: java version "1.8.0_71" Java(TM) SE Runtime Environment (build 1.8.0_71-b15) Java HotSpot(TM) 64-Bit Server VM (build 25.71-b15, mixed mode)

and when I type:

javac -version

It says that I have javac version: 1.8.0_66

Is this normal? I know that they're both version 8, but shouldn't those last numbers match as well?

2 Answers

Fixed it :) I had my path system variable pointing to jdk 1.8.0_66, so I just changed it to _72

missgeekbunny
missgeekbunny
37,033 Points

I just checked mine which is a more recent install using the SDK and they match

are you running the same version as well?

Weird, I just tried to install version 1.8.0_72 jdk and my prompt is showing the new version but the compiler is still showing 1.8.0_66

Where did you find that download? The only versions on the oracle website were _71 and _72

missgeekbunny
missgeekbunny
37,033 Points

I just downloaded Android Studio and then went with what I had when I started java. But I did install it like in September.

Perhaps there's an update for android studio that I haven't installed yet. What channels do you download AS updates through?

missgeekbunny
missgeekbunny
37,033 Points

There is a bar at the bottom of Android Studio that has the blue word check that checks for updates.

Yes I know, but you can specify in the settings which channel to search for updates through (e.g. canary channel, beta channel etc) which ones do you use? Each of those will give different versions.

missgeekbunny
missgeekbunny
37,033 Points

Yeah, I have it set to the latest stable for now just because I haven't done a lot with it just yet. I may try out dev but I've done quite a few betas and they tend to make me nervous.

Ya same, plus I've had quite a few issues already with some of their beta builds. I remember one beta version I downloaded, made all the icons like 10x bigger, I swear. I also couldn't save my font settings after it enlarged my font as well. Definitely sticking with stable builds from now on.