Back to LanguageTool Homepage - Privacy - Imprint

Java exception with serverMode and set but missing ngrams dir

Hi all!
I am on Arch Linux x86_64 with both latest Java (jre-openjdk 14.0.1.u7-1), Java8 (jre8-openjdk 8.u252-1, do I need also JDK 8 or JRE 8 is enough?) and LanguageTool 4.9.1.

Some time ago I installed ngrams (from AUR), I set the desktop application to use it but after some time I uninstalled the ngrams. Until here everything continued working fine.

Then I enabled the “Run as server” serverMode and every time I try to open languagetool desktop application I get a Java exception instead:

$ languagetool         
Not loading ngram data, directory does not exist: /usr/share/ngrams/en
java.lang.RuntimeException: LanguageModel directory not found or is not a directory: /usr/share/ngrams
	at org.languagetool.server.HTTPServerConfig.setLanguageModelDirectory(
	at org.languagetool.gui.Main.maybeStartServer(
	at org.languagetool.gui.Main.createGUI(
	at org.languagetool.gui.Main.access$1700(
	at org.languagetool.gui.Main$
	at java.desktop/java.awt.event.InvocationEvent.dispatch(
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(
	at java.desktop/java.awt.EventQueue$
	at java.desktop/java.awt.EventQueue$
	at java.base/
	at java.base/$JavaSecurityAccessImpl.doIntersectionPrivilege(
	at java.desktop/java.awt.EventQueue.dispatchEvent(
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(
	at java.desktop/

In order to reproduce, set the ngrams directory and enable the serverMode, then rename the ngrams directory so that languagetool cannot access it.

Otherwise, simply use the following ~/.languagetool.cfg: