georgewfraser / java-language-server

Java language server using the Java compiler API
MIT License
654 stars 129 forks source link

neovim support #282

Open samarth-na opened 8 months ago

samarth-na commented 8 months ago

can you provide any way of getting this working inside of neovim

i tried to get this installed with the plugin mason.nvim it gave me the following error message

Cloning git repository "https://github.com/georgewfraser/java-language-server.git"…
        Cloning into '.'...
        From https://github.com/georgewfraser/java-language-server
         * tag               v0.2.39    -> FETCH_HEAD
        + ./scripts/link_linux.sh
        Error: Module java.sql not found
        java.lang.module.FindException: Module java.sql not found
            at java.base/java.lang.module.Resolver.findFail(Resolver.java:892)
            at java.base/java.lang.module.Resolver.resolve(Resolver.java:129)
            at java.base/java.lang.module.Configuration.resolve(Configuration.java:420)
            at java.base/java.lang.module.Configuration.resolve(Configuration.java:254)
            at jdk.jlink/jdk.tools.jlink.internal.Jlink$JlinkConfiguration.resolve(Jlink.java:217)
            at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImageProvider(JlinkTask.java:523)
            at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImage(JlinkTask.java:411)
            at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.run(JlinkTask.java:286)
            at jdk.jlink/jdk.tools.jlink.internal.Main.run(Main.java:56)
            at jdk.jlink/jdk.tools.jlink.internal.Main.main(Main.java:34)
        spawn: bash failed with exit code 1 and signal 0. 

i have also started an issue on the mason repo if the problem was on there side but i didnt find any documentation on here to install it on neovim so it would be helpfull if you can provide us with that

thanks!

Gogiu23 commented 7 months ago

Dis you have installed the java dk and virtual machine installed? It seems more a problem of modules.

samarth-na commented 7 months ago

sorry for an late reply this is what i have install in my computer

-> java --version
openjdk 21.0.2 2024-01-16
OpenJDK Runtime Environment (Red_Hat-21.0.2.0.13-2) (build 21.0.2+13)
OpenJDK 64-Bit Server VM (Red_Hat-21.0.2.0.13-2) (build 21.0.2+13, mixed mode, sharing)
-> javac --version
javac 21.0.2
samarth-na commented 7 months ago

is there anything i should have installed

BuilderZac commented 2 months ago

I am also having this same issue. Any updates?

samarth-na commented 2 months ago

no unfortunately first

BuilderZac commented 2 months ago

I was able to fix it by using sdkman to install the sdk and maven. Does not seem to be a problem eith the LSP but the local java/maven install.