I am using Intellij. It is good, but when I create a new project or import a project the default project language level set to 6 (@override in interfaces). But I want to set it 8 (Lambdas, type annotations etc). How can I do that? I have tried change the settings in "Other Settings" -> "Default Project Structure" and the set the project language level to 8, but no luck. Please someone help me. I have added a screen shoot.
- I am using Intellij 14.0.2
I changed the settings to Java 8 as advised above...->Default Project Structure.
It did'nt work!!I continued not being able to write Lambda's in the editor without errors.
When I created the project, I chose Gradle as the build tool. For some reason my Java/Gradle project had the source compatibility in the build.gradle file set to 1.5 (maybe because my default was originally set to 1.5...I don't know as I did not bother to reproduce it):
Changing the sourceCompatibility to 1.8 solved the problem, since the update to the gradle file also triggers a project build.
Word to the wise: