Skip to content

Can jupyter lsp support Java Language Server e.g. eclipse jdtls #1138

@l22141

Description

@l22141

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:

Image

autocomplete is worked in the native file:

Image

java lsp in the notebook can not be initialized:

Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions