coc-java
coc-java copied to clipboard
Error jdt starting loader in coc
I downloaded coc-java and also considered the other thread about this problem (https://github.com/neoclide/coc-java/issues/12) and tried everything, but I'm getting the loading animation "jdt starting" all the time and can't figure out how to solve this issue. In relation to that, also the error "The "java" server crashed 5 times in the last 3 minutes. The server will not be restarted" occurs.
I had the same problem, I think the fact that I was still using Java 8 caused the issue. The logfile under .config/coc/extensions/coc-java-data/server/config_linux/
contained lines like: Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
.
To fix it I just set the java home to a Java 11 installation:
- Open the config file with
:CocConfig
- Set java.home by adding this line:
"java.home": "[PATH TO JAVA 11]"
. On ubuntu it is"java.home": "/usr/lib/jvm/java-11-openjdk-amd64/"
I'm having the same issue, but I need to use Java 8.
Is it not possible to use Java 8 with this project?
EDIT: I can confirm the approach in this issue works for 8: https://github.com/neoclide/coc-java/issues/99
manually download the jdt files and plop them in the extension folder (details provided by others in the above issue)
@vcavallo I think it is possible to use different versions for the project and the language server, maybe Setting the JDK could help?
@koko-ng thanks, yep, i've set the JDK as well. all the Java 8 stuff is working alright (I think), but the additional referredLibraries I'm trying to add don't seem to be picked up: #146
Me too, I use JDK 11.0.12 in windows, I can't work out it. I try to use jdt.ls 0.59 but it's nothing.
Me too, I use JDK 11.0.12 in windows, I can't work out it. I try to use jdt.ls 0.59 but it's nothing.
It’s fine when I change my user file in English.
Should be fixed on recent version of coc-java, try upgrade coc.nvim to latest release and coc-java to version 1.14.0.
From 1.14.0, coc-java uses bundled jdt.ls and check the java version as expected.