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 had same problem. Changing IntelliJ IDEA setting files (misc.xml, compiler.xml) has not helped. Then I changed language level in two places:
This worked fine.
Same problem but slightly different solution. IntelliJ (2018.1.15) gave me the option to Set Language Level to 6 which I accepted. This added the following to the project .iml file:
I was then able to update source & target to 8.
File -> Other Settings -> Default Project Structure...
You can change it in there.
I had to edit
.idea/misc.xml
and changelanguageLevel="JDK_1_7"
tolanguageLevel="JDK_1_8"
. I've been unable to change the language level via the ui in osx.** Intellij 15.0.4
If it is a maven project, make sure that the following is set.
For example, if you want to use the Java 8 language features (-source 1.8) and also want the compiled classes to be compatible with JVM 1.8 (-target 1.8), you can either add the two following properties, which are the default property names for the plugin parameters:
For more details check this
I was able to resolve this problem by going to:
File -> Project Structure... And selecting an option from the dropdown under "Project language level"
Hope this helps!