jdk-11, Eclipse Photon 18-9, windows 7, Error free Application ported from java 6 until java 8. Just trying how far jdk-11 is usable with Eclipse.
JAVA_HOME points to jdk-11. Eclipse starts! But then things go strange. It’s possible to set the Java Build Path to jdk-11. But even if forced to be under Classpath the jre changes self to Modulepath!
The compiler compliance level can be set up to Java 10!
Under project Facets the highest Version of java which can be chosen is 9! If the compliance level of java is not reduced to 9, Java version mismatch is signaled!
Building with eclipse generates the mentioned false Error in 100 of cases!
However compiling with maven, source and target set to java 11, the package build terminates with success even if compiling for jee 8.
Who knows more about that? Anyway I’ll switch back to Java 8. Conclusion after a year of new Java versions coming out, it’s still not possible to use them! Very strange.
I just encountered this same issue, what i did to fix it was i just cut out that segment of code and pasted it back in and then it worked like it was supposed to. It can be caused by a small bug in the compiler. It stumped me for about an hour, but I got it! Otherwise, if you right click the project folder and go to properties, then compiler, you can change the compliance level to 11. this prevented the error from appearing a second time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With