I got this error when trying to call a static method in a Maven project that I'm working on. I thought that this error seemed odd, as I'm using 1.8.
Additionally, I added the following to my pom.xml
:
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
Neither solution seemed to work, and I'm puzzled as to why. Any help is appreciated.
Right click on project -> properties -> Java Compiler -> set Compiler compliance level to 1.8.
This fixed the problem for me.
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