After a switch to JDK8 the MANIFEST.MF Attributes started returning null
https://bugs.openjdk.java.net/browse/JDK-8201636 suggests that this is a bug introduced by Oracle in JDK 8u151-8u172.
I use pom.xml and IntelliJ IDEA. pom.xml
specifies (tags <
and >
removed)
<maven.compiler.target> 1.8 </maven.compiler.target>
<maven.compiler.source> 1.8 </maven.compiler.source>
IDEA settings show target bytecode version 1.8
JAVA_HOME
set to JDK10
I have C:\Program Files\Java\jdk1.8.0_201
installed.
How to specify this version for the builds. Also does pom.xml
trump IDEA project settings or vice versa?
Edit:
I've specified
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<verbose>true</verbose>
<fork>true</fork>
<!--executable>{JAVA_1_8_HOME}/bin/javac</executable-->
<executable>C:/Program Files/Java/jdk1.8.0_201/bin/javac</executable>
<compilerVersion>1.8</compilerVersion>
</configuration>
</plugin>
Intellij still defaults to JDK 1.5 and chokes on List<String> a = new ArrayList<>();
with "I don't understand <> with JDK1.5".