idea创建项目默认target bytecode version为1.5
问题描述:
idea创建项目默认target bytecode version为1.5
手动将Project Settings => Modules ==>Language level改为8后
解决方案1:
1)手动将Project Settings => Modules ==>Language level改为8后
2)将Settings => Build,Execution,Deployment => Java Compiler的target bytecode version手动更改为1.8
)
3)重新reimport maven之后target bytecode version却仍然变为1.5
解决方案2:
在pom文件中加以下build,但是仍然没有效果
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.3</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> </build>
