Coc-java does not provide any completion or syntax checking in .java files. The JDT language server seems to start fine but nothing works. Upon saving the file CocInfo
reports a does not resolve to a ICompilationUnit
error.
[Info - 1:57:18 PM] JDT Language Server started
[object Object]
[Error - 1:57:22 PM] Oct. 6, 2019, 1:57:21 p.m. file:///home/Azeez/tmp/test.java does not resolve to a ICompilationUnit
[Error - 2:02:10 PM] Oct. 6, 2019, 2:02:10 p.m. file:///home/Azeez/tmp/test.java does not resolve to a ICompilationUnit
I'm using vim8 on Cygwin with coc.nvim. I was able to get c++ completion and syntax checking working, so coc.nvim should be working fine.
echo $JAVA_HOME
C:\Program Files\OpenJDK\jdk-12.0.2
!SESSION 2019-10-06 13:55:54.082 -----------------------------------------------
eclipse.buildId=unknown
java.version=12.0.2
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_CA
Command-line arguments: -data C:\home\Azeez\.config\coc\extensions\coc-java-data\jdt_ws_2987ba7a0b84d3737abf1a0a28a03f35
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:55:58.973
!MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is started
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:55:59.337
!MESSAGE Main thread is waiting
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:55:59.400
!MESSAGE >> initialize
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:55:59.404
!MESSAGE Initializing Java Language Server 0.45.0.201910051807
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:55:59.440
!MESSAGE Static Commands: []
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:55:59.444
!MESSAGE Non-Static Commands: [java.edit.organizeImports, java.project.updateSourceAttachment, java.project.removeFromSourcePath, java.project.listSourcePaths, java.project.resolveSourceAttachment, java.project.addToSourcePath]
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:55:59.501
!MESSAGE >> initialized
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:55:59.581
!MESSAGE Creating the Java project jdt.ls-java-project
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:56:00.506
!MESSAGE Finished creating the Java project jdt.ls-java-project
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:18.993
!MESSAGE Workspace initialized in 79540ms
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:19.093
!MESSAGE >> initialization job finished
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:19.111
!MESSAGE >> workspace/didChangeConfiguration
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:19.165
!MESSAGE >>New configuration: {java={jdt={ls={vmargs=-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication}}, errors={incompleteClasspath={severity=warning}}, configuration={checkProjectSettingsExclusions=true, updateBuildConfiguration=interactive}, trace={server=off}, import={gradle={enabled=true, wrapper={enabled=true}}, maven={enabled=true}, exclusions=[**/node_modules/**, **/.metadata/**, **/archetype-resources/**, **/META-INF/maven/**]}, referencesCodeLens={enabled=false}, signatureHelp={enabled=false}, implementationsCodeLens={enabled=false}, format={enabled=true, comments={enabled=true}, onType={enabled=true, fixComment={enabled=true}}}, autobuild={enabled=true}, maxConcurrentBuilds=1.0, completion={enabled=true, overwrite=true, guessMethodArguments=false, favoriteStaticMembers=[org.junit.Assert.*, org.junit.Assume.*, org.junit.jupiter.api.Assertions.*, org.junit.jupiter.api.Assumptions.*, org.junit.jupiter.api.DynamicContainer.*, org.junit.jupiter.api.DynamicTest.*, org.mockito.Mockito.*, org.mockito.ArgumentMatchers.*, org.mockito.Answers.*], importOrder=[java, javax, com, org]}, progressReports={enabled=true}, foldingRange={enabled=true}, maven={downloadSources=false}, codeGeneration={hashCodeEquals={useJava7Objects=false, useInstanceof=false}, useBlocks=false, generateComments=false, toString={template=${object.className} [${member.name()}=${member.value}, ${otherMembers}], codeStyle=STRING_CONCATENATION, skipNullValues=false, listArrayContents=true, limitElements=0.0}}}}
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:19.172
!MESSAGE >> document/didOpen
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:21.519
!MESSAGE >> document/didChange
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:21.688
!MESSAGE >> document/didChange
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:21.701
!MESSAGE >> document/didChange
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:21.710
!MESSAGE >> document/didChange
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:21.720
!MESSAGE >> document/didChange
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:21.728
!MESSAGE >> document/didChange
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:21.735
!MESSAGE >> build jobs finished
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:21.739
!MESSAGE >> document/didChange
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:21.742
!MESSAGE >> registerFeature 'workspace/didChangeWatchedFiles'
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:21.746
!MESSAGE >> document/didChange
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:21.752
!MESSAGE >> registerFeature 'workspace/didChangeWatchedFiles'
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:21.762
!MESSAGE >> watchers registered
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:21.766
!MESSAGE >> document/willSaveWaitUntil
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 13:57:21.782
!MESSAGE >> document/didSave
!ENTRY org.eclipse.jdt.ls.core 4 0 2019-10-06 13:57:21.791
!MESSAGE file:///home/Azeez/tmp/test.java does not resolve to a ICompilationUnit
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 14:01:49.888
!MESSAGE >> java/buildWorkspace (incremental)
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 14:02:08.431
!MESSAGE >> document/willSaveWaitUntil
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 14:02:08.488
!MESSAGE >> document/didSave
!ENTRY org.eclipse.jdt.ls.core 4 0 2019-10-06 14:02:10.769
!MESSAGE file:///home/Azeez/tmp/test.java does not resolve to a ICompilationUnit
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-10-06 14:06:18.770
!MESSAGE >> document/didClose