netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Unrecognized option --start-java-language-server=stdio

Open stCarolas opened this issue 1 year ago • 1 comments

Apache NetBeans version

Apache NetBeans 21

What happened

I'm trying to start java.lsp.server for using with nvim. bin/netbeans -h says

Additional module options:
--start-java-language-server [<arg>]    Starts the Java Language Server

but when I'm trying bin/netbeans --start-java-language-server=stdio or bin/netbeans --modules --start-java-language-server=stdioI get exception

Unrecognized option --start-java-language-server=stdio

Language / Project Type / NetBeans Component

LSP

How to reproduce

run bin/netbeans --modules --start-java-language-server=stdio

Did this work correctly in an earlier version?

No / Don't know

Operating System

Fedora 39

JDK

openjdk 21

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

stCarolas avatar Feb 26 '24 16:02 stCarolas

@stCarolas are you still trying to get the LSP working in neovim? I managed to have it running with something along the line of:


return {
	cmd = {
		"<PATH_TO_NETBEANS>/netbeans/bin/netbeans",
		"--modules",
		"--enable",
		"org.netbeans.modules.java.lsp.server",
		"--start-java-language-server=stdio",
	},
	filetypes = { "java" },
	root_markers = { ".git" },
}

So it seems that the lsp module is no enable in the default binaries, and we have to enable it explicitly. I'm not convince that this is the best way to have it running, I end up with a splash screen that doesn't disappear, and the server doesn't shutdown when I exist neovim. I hope someone more familiar with the LSP module can explain how to have a more seamless start/stop experience.

Image

beajeanm avatar May 22 '25 16:05 beajeanm