Closed Dhrooven closed 1 month ago
You started the language server and it's just waiting for a connection. You need to connect to it with some client. The simplest way to do this is probably with socat
. I described how to go about this at https://github.com/eclipse-jdtls/eclipse.jdt.ls/issues/2313#issuecomment-1309651847 . I also wrote about this at https://rgrunber.github.io/vscode/java/lsp/language/server/2023/09/18/talk-to-language-server.html .
If you look at https://github.com/eclipse-jdtls/eclipse.jdt.ls#clients , you'll see a variety of known clients that are able to connect to the language server.
I am getting the same result, do I need to install socat from brew to proceed further?
No need for installing socat. I resolved it using nvim-jdtls. Follow the steps mentioned over on the nvim-jdtls installation page. If any doubt, reply.
can you please share the link of the page you are talking of, I have spent hours but still unable to do, your help would be greatly appreciated. I want to setup code linting in my java codes.
https://github.com/eclipse-jdtls/eclipse.jdt.ls#clients
Checkout this list of clients supported for eclipse-jdtls. And let me know, which one of them are you using?
If you want to use JDT-LS, that link contains most of the well-known clients. However, you wouldn't usually need to start the server yourself as most clients would handle that for you (as well as embedding the server and configuring it in a way they know would work for the client). The comment about socat
was just if you want to play around with JDT-LS and see how a language server works.
https://github.com/eclipse-jdtls/eclipse.jdt.ls#clients
Checkout this list of clients supported for eclipse-jdtls. And let me know, which one of them are you using?
Actually, I want to use code linting in CP editor, I have to give arguments for it and I am not sure which client I need to use.
This editor has the same compile command which is used in the terminal, like for compiling java code, this commands are used by me.
I tried to first run in terminal, then I am stuck at the same place where you stucked few days back,{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"12-Jan-2024, 12:00:51 am Main thread is waiting"}}
Now, I am not understanding which client to use as the clients are for sublime, vscode, nvim etc. and I want to use it for different editor which is not present in the list.
Can you please help me!
Seems like if you follow https://cpeditor.org/docs/setup/#java-server it should work.
I don't think you need to start the server yourself. If you provide the arguments under that "Java Server" tab it should automatically start it for you.
I downloaded Milestone snapshot version 1.30.1.
ran this command -
I am getting this output -
{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"12-Jan-2024, 12:00:51 am Main thread is waiting"}}
Upon running -
jps -l
i got -I waited for quite some time, still wouldn't run.