Skip to content

Issue when connecting to JAVA LSP #299

@pawansingh00

Description

@pawansingh00

Hi,

I am trying to connect to JAVA LSP - java language server (https://github.com/eclipse/eclipse.jdt.ls)

By changing this line --

const serverConnection = server.createServerProcess('JSON', 'node', [extJsonServerPath]);

as below

const serverConnection = server.createServerProcess('JSON', 'java', [
            '-Declipse.application=org.eclipse.jdt.ls.core.id1', 
            '-Dosgi.bundles.defaultStartLevel=4',
            '-Declipse.product=org.eclipse.jdt.ls.core.product',
            '-Dlog.level=ALL',
            '-noverify',
            '-Xmx1G',
            '-jar /home/pawansingh/projects/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar',
            '-configuration /home/pawansingh/projects/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository/config_linux',
            '-data /home/pawansingh/projects/monaco-languageclient/example/src/java',        
            '--add-modules=ALL-SYSTEM',
            '--add-opens java.base/java.util=ALL-UNNAMED',
            '--add-opens java.base/java.lang=ALL-UNNAMED',
            '-DCLIENT_PORT=4000'
        ]);

and it seems to give the following error --

image

Need help with this.
Any example of integrating it with java/python/go LSP will do it too.

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