so here is my problem : 
I wanted to install Eclipse on my Macbook Pro to code in Java. However when I launch the Eclipse Install I have a popup saying : 

> 
> Version 1.6.0\_65 of the JVM is not suitable for this product.  
> Version: 1.8 or greater is required.
> 
> 
> 

So I went on the java website to install the latest version of java, which is the version 8 update 121. Then I got a dmg file and started installing it. Everything worked fine and the installation finished. I tried to restart the Eclipse Install but the same popup still showed up. I went to the System Preferences in the Java section and it says that I have the latest version installed, which is 8 update 121. 

After searching a little on the internet, I checked the version in the Command Line : 

```
$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468-11M4833)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)

```

Apparently I have to tell java\_home to use the last version with the command : 

```
$ /usr/libexec/java_home -v jdk1.8.0_121 --exec javac -version

```

However I get : 

```
Unable to find any JVMs matching version "jdk1.8.0_121".

```

So I also checked which versions I had :

```
$  /usr/libexec/java_home -V
Matching Java Virtual Machines (2):
    1.6.0_65-b14-468, x86_64:   "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-468, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

```

As you can see the version 1.8.0 is not here. 
I tried to look into the file directory to find the folder in /library/Java/JavaVirtualMachines, but there is only the folder "1.6.0 jdk". 

So my question is where is Java ? Why does the System Preferences say I'm at 1.8 and the Command Line says 1.6 ? How do I install it properly in order to install Eclipse ? 
If it helps I have a Macbook Pro 2012 on macOS Sierre 10.12.2

Thanks