I have a collection of "Samples" projects. The toplevel project is empty, while it contains a lot of modules.
Unfortunately, I am often required to set target bytecode to 1.5.
I did that many times from the beginning of the project, but it still drops back to 1.5.
How to stuck with 1.8 forever?
You can use this in your pom:
( https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html )
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
我的情况(RHEL 7,IntelliJ 2019.3.1)的问题是缺少环境变量JAVA_HOME
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.