-4

I have a mac osx lion. I received a jar that I am trying to run from the terminal using:

java -jar Hello.jar

But I get the following error:

Exception in thread "main" java.lang.UnsupportedClassVersionError: hello/world
hello/world/Hello:  Unsupported major.minor version 51.0

Will someone please guide me to a solution?

I think I need to update my JVM to Java 7. But I don't know how to do that on my mac. Will someone please help?

learner
  • 11,490
  • 26
  • 97
  • 169
  • see this - http://stackoverflow.com/questions/7237536/exception-in-thread-main-java-lang-unsupportedclassversionerror-a-unsupporte – Harish Raj Dec 31 '12 at 21:19

1 Answers1

1

If you want to update your JVM, uninstall the current one and install the latest version. (Actually you don't have to uninstall the previous version, you can use as many versions as you like side by side if you know how to use just the specific version).

Depending of what you need JDK or just JRE:
JDK 7 Installation for Mac OS X
JRE 7 Installation for Mac OS X

informatik01
  • 16,038
  • 10
  • 74
  • 104