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.
To configure project settings, select IntelliJ IDEA | Preferences on macOS or File | Settings on Windows and Linux from the main menu. Alternatively, you can press Ctrl+Alt+S to show the IDE settings. icon. Other settings are global and apply to all existing projects.
From the main menu, select File | Manage IDE Settings | Restore Default Settings. Alternatively, press Shift twice and type Restore default settings . Click Restore and Restart.
Project language level Language level defines coding assistance features that the editor provides. Language level can differ from your project SDK. For example, you can use the JDK 9 and set the language level to 8.
File -> Other Settings -> Default Project Structure...
You can change it in there.
(Edit: It's now called "Structure for New Projects")
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:
<project> [...] <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties> [...] </project>
For more details check this
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