Back to LanguageTool Homepage - Privacy - Imprint

LibreOffice extension (fixed, update java to 17)

I posted a previous topic about the extension not working in LibreOffice, i debugged it and found the error to be:

java.lang.NoClassDefFoundError: Could not initialize class com.sun.java.swing.plaf.gtk.GTKLookAndFeel
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:398)
        at java.desktop/javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:2036)
        at java.desktop/javax.swing.UIManager.setLookAndFeel(UIManager.java:632)
        at org.languagetool.openoffice.MultiDocumentsHandler.setJavaLookAndFeel(MultiDocumentsHandler.java:1464)
        at org.languagetool.openoffice.MultiDocumentsHandler.getCheckResults(MultiDocumentsHandler.java:179)
        at org.languagetool.openoffice.MultiDocumentsHandler.doProofreading(MultiDocumentsHandler.java:165)
        at org.languagetool.openoffice.Main.doProofreading(Main.java:81)

I was running OpenJDK 11, it should have swing but maybe not? Or it’s trying to dynamically load /usr/lib64/libgtk-x11-2.0.so and not finding it.

Anyhow, the solution I found to work was to download JDK 17 from Oracle and set that as the jvm in LibreOffice settings. Now the extension seems to work properly.

Hi,
The same happened to me and then I installed JDK 17 from Oracle:
ricardo@rjlima:~$ java --version
java 17.0.2 2022-01-18 LTS
Java™ SE Runtime Environment (build 17.0.2+8-LTS-86)
Java HotSpot™ 64-Bit Server VM (build 17.0.2+8-LTS-86, mixed mode, sharing)

In LO, I have gone to Options, Advanced and marked JDK 17.

But now a screen error appears, and I don’t know what to do with it, it’s attached.
My LO version is 6.4

Do these hints help, maybe? Linux-specific issues : LanguageTool

Thanks @dnaber ! The first hint was enough to fix it. LO crashed once, then restarted, and LT is already on.

Hello,
I am on Manjaro and have another problem. Libreoffice with LT extension installed freezes after some time. I checked my Java settings in Libreoffice: 17.0.1 version installed. Any help?