unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Pankaj Jangid <pankaj@codeisgreat.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Editing Java (with LSP)
Date: Fri, 17 Jun 2022 08:57:31 +0530	[thread overview]
Message-ID: <87r13ovujg.fsf@codeisgreat.org> (raw)
In-Reply-To: 875yl0sp2p.fsf@gmail.com

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.




  reply	other threads:[~2022-06-17  3:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 13:43 Editing Java (with LSP) Alessandro Bertulli
2022-06-13 15:48 ` Filipp Gunbin
2022-06-13 21:53   ` Alessandro Bertulli
2022-06-14 19:12     ` Filipp Gunbin
2022-06-13 20:32 ` Milan Zamazal
2022-06-16  3:29 ` Pankaj Jangid
2022-06-16 13:34   ` Alessandro Bertulli
2022-06-17  3:27     ` Pankaj Jangid [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-06-13 21:35 Alessandro Bertulli
2022-06-14 19:13 ` Milan Zamazal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r13ovujg.fsf@codeisgreat.org \
    --to=pankaj@codeisgreat.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).