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

Have to start emacs with sudo, otherwise jdtls won't work #452

Open
Crayon277 opened this issue Sep 13, 2023 · 3 comments
Open

Have to start emacs with sudo, otherwise jdtls won't work #452

Crayon277 opened this issue Sep 13, 2023 · 3 comments

Comments

@Crayon277
Copy link

Describe the bug
jdtls exit immediately when I launch emacs normally (normally means click the app icon, type emacs on iterm)
and report Server jdtls:67683/starting exited (check corresponding stderr buffer for details). Do you want to restart it? (y or n)

UNLESS , I use sudo emacs to launch the emacs.
Is that normal? Because I don't see any requirement of root authority on the chain.

Environment
macOS: Ventura 13.5.1
emacs: [email protected] (installed by brew)
lsp-java: 20230827.428
jdtls : jdt-language-server-1.26.0-202307271613
java : 17 (JAVA_HOME is setted by jenv)

To Reproduce

  1. Download jdtls-1.26 from http://download.eclipse.org/jdtls/milestones/
  2. add jdtls' bin dir to PATH. By the way , the directory which hold the jdtls can access by normal authority , no need sudo.
    export PATH=/Users/mmmmmcclxxvii/.emacs.d/lsp-server/jdt-language-server-1.26.0-202307271613/bin:$PATH
    image
  3. Install lap-java via melpa
  4. (setq lsp-java-server-install-dir "~/.emacs.d/lsp-server/jdt-language-server-1.26.0-202307271613")
  5. configure follow by Quick start
  6. launch emacs --debug-init
  7. C-x C-f open ~/Develop/temp/Application.java

Expected behavior
show: LSP:: jdtls connected to xxxx

Screenshots
image
Above screenshot is launching emacs normally


image

Above screenshot is launching emacs via sudo emacs

@Crayon277
Copy link
Author

info from lsp-log

Command "semgrep lsp" is not present on the path.
Command "semgrep lsp" is not present on the path.
Found the following clients for /Users/mmmmmcclxxvii/Develop/temp/Application.java: (server-id jdtls, priority 0)
The following clients were selected based on priority: (server-id jdtls, priority 0)
Command "semgrep lsp" is not present on the path.
Command "semgrep lsp" is not present on the path.
Found the following clients for /Users/mmmmmcclxxvii/Develop/temp/Application.java: (server-id jdtls, priority 0)
The following clients were selected based on priority: (server-id jdtls, priority 0)
``

@ashton
Copy link

ashton commented Dec 18, 2023

Same error here, also with jdtls, using doom emacs

@ashton
Copy link

ashton commented Dec 18, 2023

trying to install semgrep manually results in another error
image

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