Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java command is not found #36

Open
Jakkaps opened this issue Nov 10, 2018 · 1 comment
Open

java command is not found #36

Jakkaps opened this issue Nov 10, 2018 · 1 comment

Comments

@Jakkaps
Copy link

Jakkaps commented Nov 10, 2018

When using the "M-x langtool-check" command, I receive the error "java command not found"

This is my .emacs file:
(add-to-list 'load-path "~/.emacs.d/LanguageTool-4.3/") (setq langtool-java-bin "/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/bin") (setq langtool-language-tool-jar "~/.emacs.d/LanguageTool-4.3/languagetool-commandline.jar") (setq langtool-default-language "en-US") (require 'langtool)

I installed the melpa package, java and downloaded version 4.3 of langtool.
There´s nothing wrong with the langtool download, as it works perfectly fine from the command-line. What am I doing wrong?

@dariusbdockery
Copy link

When using the "M-x langtool-check" command, I receive the error "java command not found"

This is my .emacs file:
(add-to-list 'load-path "~/.emacs.d/LanguageTool-4.3/") (setq langtool-java-bin "/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/bin") (setq langtool-language-tool-jar "~/.emacs.d/LanguageTool-4.3/languagetool-commandline.jar") (setq langtool-default-language "en-US") (require 'langtool)

I installed the melpa package, java and downloaded version 4.3 of langtool.
There´s nothing wrong with the langtool download, as it works perfectly fine from the command-line. What am I doing wrong?

I am on Windows 10, so I am not sure whether this will help you or not (and I am responding pretty late to this question), but what worked for me was resetting the langtool-java-bin variable back to the default, which for my machine was just "java". I have java in my path so I am guessing it finds it automatically instead of through the file path I had as a variable like you do. After resetting the variable back to default everything worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants