coc-java
coc-java copied to clipboard
Error at for method references allowed only at source level 1.8
Sorry if this is an obvious/dumb question. I kinda new to all this.
I get this error when i type:
Thread t = new Thread(PrinterThread::print);
but if i compile and run the Java file, it executes fine. But after the buffer (using Vim) reloads and shows the error, compile and running again will give me error [Java 1610613382] [E] Method references are allowed only at source level 1.8 or above.
I have tried setting the java.configuration.runtimes in my CocConfig but still does the same thing.
Don't know what that means, it could be from jdt.ls.
It sounds like you have the Java source version set to something less than 1.8 somewhere in your project. If you were using Maven for your build you'd set the version in your pom.xml like this:
<properties>
<java.version>1.8</java.version>
</properties>
Should be bad configured java version.