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 Local Development Environments How it Works Check Your Installation

Paste the results from running this command: java -version

I have followed all instructions, pasted my code, and it won't let me pass this challenge.

Confused..

Please help.

results.txt
# Paste your info below

Zach-MBP:~ zfreitag34$ java -version
java version "10" 2018-03-20
Java(TM) SE Runtime Environment 18.3 (build 10+46)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10+46, mixed mode)

2 Answers

Yanuar Prakoso
Yanuar Prakoso
15,196 Points

Hi Zach

Looks like the challenge expect you to install Java JDK SE Development Kit 8 which the java -version command will result pattern like this:

java version "1.8.x_xxx"
Java(TM) SE Runtime Environment (build 1.8.x_xx-xxx)
Java HotSpot(TM) 64-Bit Server VM (build xx.xxx_xx, mixed mode)

I already tried the same challenge as you are right now and use your java -version result it did not manage to pass it. Then I tried using my java -version from my laptop and it passed. The java -version command result is just like that with 'x' characters were substituted according to which version release of Java JDK SE Develoment kit 8 you choose to install.

I assumes that the challenge only tests the patterns of your java -version (maybe using some kind of regular expression test). But I cannot tell for sure. Anyway below I proposed some solutions:

If you just want to pass this challenge and keep experimenting using Java JDK 10 while continuing the Java courese, then you can use my full result of the java -version, below:

java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

Just copy paste it into your challenge page. However, if you choose to use Java JDK 8 this Development Kit will be the same as what the teachers are using while Running their IDE. If you choose to install Java JDK 8 the java -version command will return similar answer as my example above. Thus you can input it yourself copying from your terminal.

But the end choice is in your hand, it is also interesting to see how Java JDK 10 will cope with tasks build using JDK 8.

I hope this can help a little.

Thanks Yanuar!

I'm going to stay with Java JDK 10 since that's what people are using at work. I appreciate how you really went the extra mile to explain this one.

Double thumbs up!