I believe OS X (at least 10.8) uses the following paths:
- JRE:
/System/Library/Frameworks/JavaVM.framework/Versions/Current
- JDK:
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK
Those are symlinks, which you can update to point to your 1.7 installation.
You can verify this fairly easily:
a) run which java
to check which java executable is being executed. In theory, that should be /usr/bin/java
.
b) run ls -la
on your java executable, which should tell you where it points (/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
on my machine).
I think this should sort your .jar
execution issue. If your Java application is wrapped in a .app
, I believe it's a bit more complex: if memory serves, the version of java used will depend on the JavaApplicationStub
being used by the .app
.