This post shows how to change Java Language Level
in IntelliJ IDEA
.
Requirements
Stuff used in this post.
IntelliJ IDEA Ultimate 2016.3
Java 8
Windows 10 Enterprise
Wrong Language Level Example
Consider the following screenshot. On line 26, the IDE
provides a clue as to why forEach
is not supported. The maven project is initially in Language Level 1.7
.
[wp_ad_camp_1]
Change Language Level
To change the Language Level
to 8
,
[wp_ad_camp_2]
- Right-click on the project
comturretarxjava
and chooseOpen Module Settings
- Choose the correct minimum
Language Level
that supportsLambda
expressions - Click OK
Issue Fixed
[wp_ad_camp_3]
[wp_ad_camp_4]