#872 TeXstudio does not use LanguageTool

None
fixed
nobody
1
2014-03-24
2013-12-15
Lajos Cseppentő
No

TeXstudio 2.6.6 does not use LanguageTool. :-(

Versions:
TeXstudio 2.6.6 (hg 4105+:b24377c712d7+)
LanguageTool 2.3
OS: Windows 8.1 Pro, x64, en-GB
Java 7 (both 32 and 64 bit)

LanguageTool works, if I start the standalone (gui) then it works. I enabled the server and I can reach it if I type http://localhost:8081 in a browser. If I type:

http://localhost:8081/?text=give%20me%20allthe%20errors&language=en-GB

I get a result. TeXstudio does not use. I enabled and set everything which was in the tutorial, I even tried to set the server or the standalone JAR. If it is running, it not work, if languagetools is not running, it is not started. Each application is allowed by the firewall, I checked this with Fiddler4 and no request was sent to localhost:8081 :-(

Please fix this bug as I would like with TeXstudio as it is the best!

Discussion

  • Arcanefoam
    Arcanefoam
    2013-12-16

    Hi,
    I think the issue is that TexStudio does not launch LanguageTool. Looking at this bug it seems that TexStudio has absolute linux paths to search for java and LanguageTool. I haven't looked at the code so perhaps it has an OS based search, however if paths are absolute then its not going to work for everyone.

    Java will most surely be added to your PATH so just invoking java should work. For LangaugeTool there could be a tip asking users to create the LANGUATE_TOOL environment variable with the path to your languagetool installation.

    I wished I could contribute a patch, but my C is very rusty.

    Lajos: What I am doing in the mean time is to launch LanguageTool in a console (Start->run->cmd) with this command (adjust to point to your LanguageTool location):

    java -cp "C:\Program Files (x86)\LanguageTool-2.3\languagetool-server.jar" org.languagetool.server.HTTPServer --port 8081

    You can see TexStudio using the server in the cmd window. When you finish just go to the cmd window and type ctrl+c to stop the server.

    Cheers,

     
  • Looking at this bug it seems that TexStudio has absolute linux paths to search for java and LanguageTool.

    No, it uses the paths you have set on the grammar config page for "java" and "LT"

     
  • Arcanefoam
    Arcanefoam
    2014-01-03

    Ok, but then the bug is still there :O.

     
  • java -cp "C:\Program Files (x86)\LanguageTool-2.3\languagetool-server.jar" org.languagetool.server.HTTPServer --port 8081

    That path might be an issue

    It does not handle spaces correctly

    Perhaps it works, if you actually set it to "C:..." instead C:.. in the config dialog

     
    • status: open --> fixed
    • Group: -->
     
  • In 2.7 it puts quotes around the path if it contains spaces