Solution#1:
Add Java version in properies section of pom.xml
Solution#2:
You have to add build configuration in your pom.xml
Solution#3: For IntelliJ users, add the following configuration.
Use both Solution#1 and Solution#2, Then add settings like below:
File -> Project Structure -> Project Settings -> Modules -> "Your Module Name" -> Sources -> Language Level
and change to your desired level i.e 1.8 or others.
Add Java version in properies section of pom.xml
<properties>
......
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
Solution#2:
You have to add build configuration in your pom.xml
<build>
.....
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
Solution#3: For IntelliJ users, add the following configuration.
Use both Solution#1 and Solution#2, Then add settings like below:
File -> Project Structure -> Project Settings -> Modules -> "Your Module Name" -> Sources -> Language Level
and change to your desired level i.e 1.8 or others.
No comments:
Post a Comment