Writer extension LibreGrammar 5.1 inoperable

Hello,
I just downloaded and installed the Writer extension LibreGrammar 5.1 on an iBook Pro running Catalina 10.15.7 for use with LibreOffice 7.0.4.2. Also downloaded and installed Java runtime environment 13.0.2.

LibreGrammar fails, and this error message is displayed:

An error has occurred in LanguageTool 5.1 (2020-09-26 13:37)

java.lang.NullPointerException

Stacktrace:

java.lang.NullPointerException

at org.languagetool.openoffice.LinguisticServices.getLocale(LinguisticServices.java:168)

at org.languagetool.openoffice.SpellAndGrammarCheckDialog.(SpellAndGrammarCheckDialog.java:108)

at org.languagetool.openoffice.MultiDocumentsHandler.trigger(MultiDocumentsHandler.java:1096)

at org.languagetool.openoffice.Main.trigger(Main.java:171)

OS: Mac OS X on x86_64, Java version 13.0.2 from oracle Corporation

If anyone has an idea about the cause of the problem, and a suggested solution, please do respond. Thank you.

Jim Martin

Also downloaded and installed Java runtime environment 13.0.2.

JRE or JDK? (on macOS you need to install a JDK - see FAQ) and: Are you aware of bug tdf#135479 - LO Complains about missing JDK when accessing any Java functionality, despite recognizing JDK on macOS under Preferences which applies to you, since you are using LibreOffice version >=7.0.0.2 on macOS (My latest knowledge is, that only JDK version 12.0.2 is known to work, but please check the bug report on your own for recent updates to that)?

Opaque,
Thank you for replying.

Both JDK 13.0.2 and JDK 15.0.2 generate the same error outlined in the original request… I cannot locate a downloadable JDK 12.0.2. Although I now am aware of the bug report you mention, I am not technically sophisticated enough to use the information users provide in it. Since the LibreGrammar extension works with neither Java version, I can at least confirm the LO 7.0.4.2 bug does exist.

Thank you again.

Jim Martin

Hello,

To install a working JDK 12.0.2

  • Stop (Quit) LibreOffice
  • Open a Terminal (Launchpad - Search for “Terminal”)
  • cd Downloads
  • curl -O https://download.java.net/java/GA/jdk12.0.2/e482c34c86bd4bf8b56c0b35558996b9/10/GPL/openjdk-12.0.2_osx-x64_bin.tar.gz
  • sudo mkdir -p /Library/Java/JavaVirtualMachines/ (password requied)
  • sudo tar -xvf openjdk-12.0.2_osx-x64_bin.tar.gz -C /Library/Java/JavaVirtualMachines/
  • Start LibreOffice
  • LibreOffice → Preferences → LibreOffice → Advanced and check Java/JRE

This manual procedure worked for me to install 12.0.2 and to use it.

Hope that helps you as well, though it is a manual command line based one.

Opaque, Thank you once again for helping. I will attempt to do as you suggest.
Jim Martin