I am trying to install Java 7 on my Mac but after the install if I do a java -version I still see the old version... Can someone please help me out
....or you may modify Apple symlink (the one you call when you run java -version) :
Do a :
sudo ln -sf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java /usr/bin/java
If you're asking about the Java 7 JRE. You may not realize that java --version reports the java version from Apple (which is usually 1.6.x). Apple stopped provided JRE updates and now point Mac users to Oracle to install Java 7.
To get which version of Java 7 is installed you need to run
/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
As noted by Oracle's page here: http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jre.html#version
You can always see the version of Java being used for Java web plug-ins by going to javatester.org and seeing what version number it returns. If you're asking about the entire Java Development Kit (JDK), then you need to install the JDK to replace the older Mac components.
If you have the Java SDK (not just the JRE), then
You can make this selection permanent by editing