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

Grigorij Schleifer
Grigorij Schleifer
10,365 Points

CanΒ΄t show the new update via terminal

Hi folks,

i have made the update and the build number of my java is Build 1.8.0_60-b27

But aftre java -versions i only see

java version "1.7.0_75" Java(TM) SE Runtime Environment (build 1.7.0_75-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)

Whats wrong?

Maybe someone can help me?

results.txt
# Paste your info below
Grigorij Schleifer
Grigorij Schleifer
10,365 Points

For now I am so far:

java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)
Nexuskillers-MacBook-Pro:~ nexuskiller$ cd /Library/Java/JavaVirtualMachines
Nexuskillers-MacBook-Pro:JavaVirtualMachines nexuskiller$ ls
jdk1.7.0_45.jdk jdk1.7.0_75.jdk
Nexuskillers-MacBook-Pro:JavaVirtualMachines nexuskiller$ /usr/libexec/java_home -verbose
Matching Java Virtual Machines (4):
    1.7.0_75, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home
    1.7.0_45, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
    1.6.0_65-b14-466.1, x86_64: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-466.1, i386:   "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home

And after istalling the Java 8 JDK I am here:

Nexuskillers-MacBook-Pro:~ nexuskiller$ java -versions
Unrecognized option: -versions
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

I I go to the /Library/Java/JavaVirtualMachines and hit verbose I see the version I need:

Nexuskillers-MacBook-Pro:JavaVirtualMachines nexuskiller$ /usr/libexec/java_home -verbose
Matching Java Virtual Machines (5):
    1.8.0_60, x86_64:   "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
    1.7.0_75, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home
    1.7.0_45, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
    1.6.0_65-b14-466.1, x86_64: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-466.1, i386:   "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

Now I am confused ....

2 Answers

Chris Howell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Chris Howell
Python Web Development Techdegree Graduate 49,702 Points

Hi, The part where you said:

"And after istalling the Java 8 JDK I am here: ".

It looks like you mistyped the command: it should be java -version NOT java -versions

But even after typing java -version it is not showing your new 1.8 JRE that you installed?

Grigorij Schleifer
Grigorij Schleifer
10,365 Points

Hey Chris,

nice hint !!!!!

Thanks :)