OS X Java/version issues

I just installed LanguageTool Version 2.9, 2015-03-30. When I try to use it (standalone), I get the error below. I have checked the issues/checklist and run the Java for OS X installer as instructed there.

My Java pref panel shows Java 8, update 45.

java -version from the command line says:

java version “1.6.0_65”
Java™ SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot™ 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)

The ERROR:

Exception in thread “main” java.lang.UnsupportedClassVersionError: org/languagetool/gui/Main : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

That means you’re still on Java 6, and LT requires Java 7 or later. More than one Java can be installed at the same time, but I don’t know how to configure OS X to use one over the other.

That’s what I thought the “Java for OS X” installer was doing (installing a later version of Java). I don’t get how the Java panel shows version 8 but the command line shows 6, nor how to fix it. Anyone have an idea?

Answered my own question: needed to install “Java SE” from the Oracle website: http://www.oracle.com/technetwork/java/javase/downloads/index.html