Java Error while updating Language Tool

Hi:

I'm using LibreOffice Writer Version: 4.1.3.2 Build ID:
70feb7d99726f064edab4605a8ab840c50ec57a under 64 bit Ubuntu 12.04 LTS.

I received a notification that an update was available for the Language
Tool, so I clicked and, for the first time ever, it actually downloaded
something, but the installation failed with the following message:

Hi:

I'm using LibreOffice Writer Version: 4.1.3.2 Build ID:
70feb7d99726f064edab4605a8ab840c50ec57a under 64 bit Ubuntu 12.04 LTS.

I received a notification that an update was available for the Language
Tool, so I clicked and, for the first time ever, it actually downloaded
something, but the installation failed with the following message:

==================================

[snip]​​

java.lang.UnsupportedClassVersionError: org/languagetool/openoffice/Main :
Unsupported major.minor version 51.0

[snap]​​

The extension will not be installed.

In Options: LibreOffice: Advanced, I show two Java Runtime Environments
installed:
(selected): Sun Microsystems 1.6.0_27
(not selected): Oracle Corporation 1.7.0_25

What do I do? I don't want to break anything else that uses Java and
everything else seems to work.

​Here's your problem. It seems like the languagetool extension is built
against Java7 (which is the currently recommended version anyway), and your
installation of Libreoffice use Java6.
(for more informations, ​see
http://en.wikipedia.org/wiki/Java_class_file#General_layout, which gives a
helpful list of major version for java class files amongst other things).

As for your issue, switching to Java7 is likely to fix it, and unlikely to
break anything. Although mishap can happen, Java is usually quite nice with
retrocompatibility (in case you have anything in LibreOffice that actually
use Java beside languagetool...).

Thanks. I switched to the Oracle version already installed and that allowed
the update to proceed without errors.

I guess I should mark this as SOLVED, but I don't see how to do that.

Hello CVAlkan,

I guess I should mark this as SOLVED, but I don't see how to do that.

Your MUA should allow you to alter the subject line, as I've just done
on your behalf.

And <http://extensions.libreoffice.org/extension-center/languagetool> states that version 2.3 of LanguageTool "requires Java 7 now." So it is likely that the code actually makes use of features only available in Java 7, and was not only by accident compiled without a --target=6 switch.

Though, of course, the rather cryptic error message when trying to install it is not optimal...

Stephan