[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Editing Java (with LSP)
From: |
Pankaj Jangid |
Subject: |
Re: Editing Java (with LSP) |
Date: |
Fri, 17 Jun 2022 08:57:31 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Alessandro Bertulli
<alessandro.bertulli96@gmail.com> writes:
> However, both with your code and with mine, now when I try to open a
> java file I get this error:
> Error in post-command-hook (#[0
> "\303\304\301\242\305#\210\300\306.!\205.r\211q\210
> ?\205.\307\310\311 \")\207" [#<buffer CLIApp.java> (#0)
> eglot--managed-mode remove-hook post-command-hook nil buffer-live-p
> apply eglot--connect eglot--guess-contact] 4]): (file-missing "Searching
> for program" "No such file or directory" "jdtls")
>
>> Also I use ‘exec-path-from-shell’ package to setup PATHs in GUI Emacs.
> Maybe this is part of the reason?
Yes. I forgot that long back I copied
~/.emacs.d/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository/bin/jdtls
to my path somewhere. But that isn’t good; because then the jdtls binary is not
matching with your latest jdtls version. So this is what I did now besides the
previous CLASSPATH settings.
(add-to-list 'exec-path
(expand-file-name
"eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository/bin"
user-emacs-directory))
This will fix the above error.