I installed Oracle Java JDK 8 but java command line is still reporting it is version 7 I installed jdk 1.8.0 u5, but the command line java is reporting 1.7:

$ java -fullversion
java full version "1.7.0_51-b13"

$ which java
/usr/bin/java

$ ls -l /usr/bin/java
lrwxr-xr-x  1 root  wheel  74 Oct 23  2013 /usr/bin/java -&gt; /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java


Here is what is installed

$ ls -l /System/Library/Frameworks/JavaVM.framework/Versions/
total 64
lrwxr-xr-x  1 root  wheel   10 Oct 23  2013 1.4 -&gt; CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 23  2013 1.4.2 -&gt; CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 23  2013 1.5 -&gt; CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 23  2013 1.5.0 -&gt; CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 23  2013 1.6 -&gt; CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 23  2013 1.6.0 -&gt; CurrentJDK
drwxr-xr-x  8 root  wheel  272 May 13 10:21 A
lrwxr-xr-x  1 root  wheel    1 Oct 23  2013 Current -&gt; A
lrwxr-xr-x  1 root  wheel   59 Oct 23  2013 CurrentJDK -&gt; /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents


also:

$ /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java -fullversion
java full version "1.7.0_51-b13"


The java control panel applet reports 1.8, but in /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/

Any idea where it went?
I had the same problem on OS X Yosemite 10.9.

The problem was solved by installing the Java SE Development Kit 8.

I had installed the other version that is not a SE development kit and it was just working in web browsers, not for the terminal.