Ok, I'm a bit new to Macs and OSX, but I picked one up so that I can do some troubleshooting on my Java programs with one since the company I work for uses a combination of OSX and Windows machines. The problem I'm running into is, when I install Java 7 from Oracle's website, it updates the preferences menu and appears to execute .jar files correctly when double-clicking them, but the terminal window's version is still 1.6.0_43 and running the same .jar file from the terminal results in runtime errors due to the older version.
When I navigate to /Library/Java/JavaVirtualMachines/ I'm presented with an empty folder. From what I've seen in other articles, this is where the Java 1.7.0's version folder should be. Any idea what's going on? How can I get the terminal to use the correct version of Java?
Edit: @DWilches comment on his original answer: (1)
total 64
lrwxr-xr-x 1 root wheel 10 Mar 17 21:38 1.4 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Mar 17 21:38 1.4.2 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Mar 17 21:38 1.5 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Mar 17 21:38 1.5.0 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Mar 17 21:38 1.6 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Mar 17 21:38 1.6.0 -> CurrentJDK
drwxr-xr-x 8 root wheel 272 Mar 17 21:38 A
lrwxr-xr-x 1 root wheel 1 Mar 17 21:38 Current -> A
lrwxr-xr-x 1 root wheel 59 Mar 17 21:38 CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents
(2)
ls -ld /usr/bin/java
lrwxr-xr-x 1 root wheel 74 Mar 17 21:38 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
Edit: sorry for the mistake with a new answer, gotten too used to sites that block edits of the original post after so long...
Current
. – Perception