idea changed to 1.8 compiler environment

 

1.Project Structure of Project SDK select 1.8, Project language level selection 8

 

 

In 2.Project Structure Modules, select the language level 8

 

 

 

java compiler 3.setting in, project bytecode version and select Target bytecode version 1.8

 

 

Other methods:
Maven configuration

<!--控制项目的language level和compile 版本-->
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
              <source>1.8</source>
              <target>1.8</target>
          </configuration>
      </plugin>

 

Guess you like

Origin www.cnblogs.com/kiko2014551511/p/11525609.html