Menu

#2251 LanguageTool does not start automatically

open
nobody
1
2017-09-23
2017-09-01
Xiaodong
No

In the configuration settings, I have already enabled the auto-start for the LanguageTool, but still the tool doesn't start as a server when TeXStudio is started. I believe I have carefully followed the official instructions to configured both LanguageTool 3.8 and TeXStudio 2.12.6. The error message basically saying, cannot connect to http://localhost:8081/v2/check, ERROR: Invalid pattern is specified in "path:pattern", or something like that from the message window of TeXStudio. The output from the help-->Check LanguageTool gives the following:

where java: 

JAVA: C:\Program Files\Java\jre1.8.0_121\bin\java.exe -version

Real-time checking is enabled.
Grammar checking is enabled.

Tries to start automatically.

LT current status: error

LT-URL: http://localhost:8081/v2/check

Windows 10 Pro x64 is my OS. However, if I manually start LanguageTool before TeXStudio, everything works fine.

Let me know if I should do something to fix this error if this is my own cause, or provide more information if anyone else can reproduce this error in normal cases. Thanks!

Discussion

  • Xiaodong

    Xiaodong - 2017-09-01

    Sorry, my mistake, I was copying an earlier error message. The output from LanguageTool check should be

    where java: 
    
    JAVA: "C:\Program Files\Java\jre1.8.0_121\bin\java.exe" -version
    java version "1.8.0_121"
    Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
    
    Real-time checking is enabled.
    Grammar checking is enabled.
    
    Tries to start automatically.
    
    LT current status: error
    
    LT-URL: http://localhost:8081/v2/check
    

    I indeed put a pair of quotation marks on my Java address (I thought the issue of using address with spaces have been fixed since TeXStudio 2.7, but it doesn't seem to be the case for me and I have manually added the quotation marks). The full error from the message window of TeXStudio after checking LanguageTool is

    Process started: where "C:\Program Files\Java\jre1.8.0_121\bin\java.exe"
    
    ERROR: Invalid pattern is specified in "path:pattern".
    
    Process exited with error(s)
    
     
  • Xiaodong

    Xiaodong - 2017-09-01

    I just found one way to get rid of the ERROR: Invalid pattern is specified in "path:pattern" error message is to define the path to Java as java. But still the LanguageTool is not automatically starting.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-09-02

    how is languagetool specified in the config ?

     
  • Xiaodong

    Xiaodong - 2017-09-02

    LanguageTool is Run as Server on port 8081 with a defined ngram data directory. On TeXStudio, I define the LanguageTool path to D:\Applications\Study\LanguageTool\LanguageTool-3.8\languagetool.jar which is correct as it works when LT started before TexStudio. Server URL: http://localhost:8081/. LT Arguments, I have tried using the default (org.languagetool.server.HTTPServer -p 8081) and with extra parameters like org.languagetool.server.HTTPServer -p 8081 --languagemodel --allow-origin "*". Certainly, I have selected the Start LanguageTool if not running option.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-09-02

    can you try to point to languagetool-server.jar ?

     
  • Xiaodong

    Xiaodong - 2017-09-02

    Just tried pointing to languagetool-server.jar, and the same issue appears. It only works if I start languagetool.jar manually. Strange...

     
    👍
    1
  • Martin

    Martin - 2017-09-03

    I have the same problem. I my case only starts with admin rights. try it.

     
  • Weikeng Chen

    Weikeng Chen - 2017-09-23

    I have the same problem. My solution is Xiaodong's suggestion plus Preferences->Language Checking->Spell Check

    I change the directory to ensure TexStudio detects its dictionaries. Only when TexStudio loads its dictionaries, it can know which langauge, and only when language is known, languagetools works.

     

Log in to post a comment.

MongoDB Logo MongoDB