Back to LanguageTool Homepage - Privacy - Imprint

Using .langaugetool.cfg with languagetool-server.jar


(ctingley) #1

Hi all,

I'm attempting to deploy LanguageTool in server mode for use by multiple users, with a single, centralized configuration. I've done this successfully by configuring rules for multiple languages through the UI to create a ~/.languagetool.cfg, and then starting the server from the UI.

This works great, except for one thing: it requires the UI. I'd like to do the same thing using languagetool-server.jar, so that I can wrap LT as a service and have it start automatically, etc.

However, when launched via the HTTPServer/HTTPSServer classes, it it looks like this configuration is ignored. (The file is parsed, but ignored unless the internalServer flag is set -- see LanguageToolHttpHandler.java.)

Is there some other way to force the languagetool-server jar to load values from the .languagetool.cfg file? I found this thread, which looked related but seems to have been about a different fix.

Thanks!


(Daniel Naber) #2

Indeed the configuration is always ignored:

Having an option for that would make sense I guess. Maybe you'd like to create a pull request? A different approach is to start the GUI like this:

java -jar languagetool.jar --tray

It's still a GUI, but you only see it in the system tray and it can run the server.


(ctingley) #3

Thanks, I'll open a pull request.


(ctingley) #4

Opened issue 280 and PR 281.