Page 1 of 1

Java language server

Posted: 15 Mar 2023 16:06
by Rickard Johansson
Java language server
A Java language server based on v3.0 of the protocol and implemented using the Java compiler API.

Install
Install Java jdk: https://www.oracle.com/java/technologie ... loads.html
The language server seems to require version 18.x when writing this.

Download the language server: https://github.com/georgewfraser/java-language-server
* Extract the server to a folder (and make sure the path does not contain spaces).
* Open a terminal window in the language server folder and type:

Code: Select all

>mvn dependency:resolve
>mvn dependency:resolve -Dclassifier=sources
>scripts\link_windows.sh
>mvn package -DskipTests
Now you can add the server to a project.

Add the server in project/sites settings

Server name
Java language server

Command
lang_server_windows.cmd

Initial folder
<Path>\java-language-server-master\dist

Command line arguments

File extension and language id
.java=java

Communication channel
* Command line (stdio)

Source folders
<Path to your go project files>

Initialize options
{}