-
Here is my config local workspace_dir = vim.fn.fnamemodify(vim.fn.getcwd(), ':p:h:t')
local config = {
cmd = {
'~/.sdkman/candidates/java/17.0.6-tem/bin/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',
'-Xmx1G',
'-javaagent:~/Apps/lombok.jar',
'-Xbootclasspath/a:~/Apps/lombok.jar', -- HERE: the problem, removing this line SOLVED
'--add-modules=ALL-SYSTEM',
'--add-opens', 'java.base/java.util=ALL-UNNAMED',
'--add-opens', 'java.base/java.lang=ALL-UNNAMED',
'-jar', '/usr/local/Cellar/jdtls/1.25.0/libexec/plugins/org.eclipse.equinox.launcher_1.6.500.v20230622-2056.jar',
'-configuration', '/usr/local/Cellar/jdtls/1.25.0/libexec/config_mac',
'-data', '~/.cache/jdtls-workspace/' .. workspace_dir,
'--data', '~/.cache/jdtls-workspace/' .. workspace_dir,
},
on_attach = on_attach,
capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()),
root_dir = require('jdtls.setup').find_root({'.git', 'mvnw', 'gradlew'}),
settings = {
java = {
configuration = {
-- See https://github.com/eclipse/eclipse.jdt.ls/wiki/Running-the-JAVA-LS-server-from-the-command-line#initialize-request
-- And search for `interface RuntimeOption`
-- The `name` is NOT arbitrary, but must match one of the elements from `enum ExecutionEnvironment` in the link above
runtimes = {
{
name = "JavaSE-11",
path = "~/.sdkman/candidates/java/11.0.11-zulu/",
},
}
}
},
},
init_options = {
bundles = {
vim.fn.glob('~/Apps/java-debug/com.microsoft.java.debug.plugin/target/com.microsoft.java.debug.plugin-*.jar')
}
}
}
jdtls.start_or_attach(config) This project I'm not getting diagnostics is using JavaSE-11. |
Beta Was this translation helpful? Give feedback.
Answered by
wviana
Jul 14, 2023
Replies: 2 comments 3 replies
-
@mfussenegger Would you have any tip where to look for why is this happening. Sorry for tagging you, please tell me if I shouldn't and it won't repeat. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Removed the Figured out by this issue response |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
wviana
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Removed the
'-Xbootclasspath/a:/<home>/Apps/lombok.jar',
and keep just
'-javaagent:/<home>/Apps/lombok.jar',
Figured out by this issue response