-
Notifications
You must be signed in to change notification settings - Fork 153
Description
Description
Currently, I use jjava kernel to do some data analysis with java. I am not sure whether jupyter lab lsp support java language server or not . As per official language server list, i installed eclipse jdtls (a popular java language server) , and config the language server for eclipse jdtls. it seems that when i create a native file(.java) in jupyer lab, it can initialize the server successfully and autocomplete is OK. But when i create a notebook using jjava kernel, the server can't be initialized and autocomplete is also not work.
Below is the server config:
{
"LanguageServerManager": {
"language_servers":{
"java_lsp": {
"version": 2,
"argv": [
"java",
"-Declipse.application=org.eclipse.jdt.ls.core.id1",
"-Declipse.product=org.eclipse.jdt.ls.core.product",
"-Dlog.level=ALL",
"-Xmx1G",
"--add-modules=ALL-SYSTEM",
"--add-opens", "java.base/java.util=ALL-UNNAMED",
"--add-opens", "java.base/java.lang=ALL-UNNAMED",
"-jar", "/Users/mac/jupyter_plugins/eclipse_jdtls/plugins/org.eclipse.equinox.launcher_1.6.900.v20240613-2009.jar",
"-configuration", "/Users/mac/jupyter_plugins/eclipse_jdtls/config_mac",
"-data", "/Users/mac/java_workspace"
],
"languages": ["java"],
"mime_types": ["text/x-java-source"],
"display_name": "JDT LS"
}
}
}
}
java lsp in the native file initialized successfully:

autocomplete is worked in the native file:

java lsp in the notebook can not be initialized:

jupyter lab version: 4.4.2
juperlab lsp version: 5.1.0
java language server (eclipse jdtls) : 1.43.0
java version: 17.0.7
python version 3.13.3
os version: MacOS 12.7.6