Using Mac OS X 10.5.8
I was getting some UnsupportedClassVersionError when I tried running my application in Mac OS X. This error means I’m trying to use code compiled in a Java version not supported by my JVM.
To check Java version, I used “java – version” that told me I’m using Java 1.5. My code is compiled in JDK 1.6. So I tried to find out how to upgrade my JVM version to 1.6.
So, I found out that Java 6 is already installed, I just needed to run this command:
/Applications/Utilities/Java\ Preferences.app/Contents/MacOS/Java\ Preferences
and drag Java 6 to the first position.
Thanks to:
http://meus5cents.blogspot.com/2009/04/java-6-no-mac-os-x-leopard.html