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

Client 1 quit with exit code 1 and signal 0. (java starter) #78

Open
incafox opened this issue Jan 19, 2024 · 2 comments
Open

Client 1 quit with exit code 1 and signal 0. (java starter) #78

incafox opened this issue Jan 19, 2024 · 2 comments

Comments

@incafox
Copy link

incafox commented Jan 19, 2024

I'm using the starter.lvim and sdkman tool but cannot git it works. IM getting "Client 1 quit with exit code 1 and signal 0" after open a java project with same java version.
image

local/state/lvim/lsp.log:

[INFO][2024-01-18 22:56:21] .../lua/vim/lsp.lua:1344 "LSP[null-ls]" "server_capabilities" { server_capabilities = { codeActionProvider = { resolveProvider = false }, completionProvider = { allCommitCharacters = {}, completionItem = { labelDetailsSupport = true }, resolveProvider = false, triggerCharacters = { ".", ":", "-" } }, documentFormattingProvider = true, documentRangeFormattingProvider = true, executeCommandProvider = true, hoverProvider = true, textDocumentSync = { change = 1, openClose = true, save = { includeText = true } } }} [ERROR][2024-01-18 22:56:21] .../vim/lsp/rpc.lua:734 "rpc" "java" "stderr" "Unrecognized option: --add-modules=ALL-SYSTEM\nError: Could not create the Java Virtual Machine.\nError: A fatal exception has occurred. Program will exit.\n"

@hugginsio
Copy link

What Java version are you using?

@arglin
Copy link

arglin commented Feb 9, 2024

try edit java.lua

the path to jdtls should be under lvim, not nvim. After update it it worked for me.

local config = {
  cmd = {
    "java",
    "-Declipse.application=org.eclipse.jdt.ls.core.id1",
    "-Dosgi.bundles.defaultStartLevel=4",
    "-Declipse.product=org.eclipse.jdt.ls.core.product",
    "-Dlog.protocol=true",
    "-Dlog.level=ALL",
    "-Xms1g",
    "--add-modules=ALL-SYSTEM",
    "--add-opens",
    "java.base/java.util=ALL-UNNAMED",
    "--add-opens",
    "java.base/java.lang=ALL-UNNAMED",
    "-javaagent:" .. home .. "/.local/share/nvim/mason/packages/jdtls/lombok.jar",
    "-jar",
    vim.fn.glob(home .. "/.local/share/nvim/mason/packages/jdtls/plugins/org.eclipse.equinox.launcher_*.jar"),
    "-configuration",
    home .. "/.local/share/nvim/mason/packages/jdtls/config_" .. os_config,
    "-data",
    workspace_dir,
  },
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

3 participants