So far, I find these places talking about JDK version
- Settings -> Java Compiler -> Project Bytecode
- Project Settings -> Modules -> Sources and set language level
.idea/compiler.xml: <module name="my_module" target="1.8" />
- Windows
JAVA_HOME
pom.xml
<properties> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.source>1.8</maven.compiler.source> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties>
After setting each of them to JDK8 the compiler still defaults to 1.5 and fails
Error:(59, 21) java: try-with-resources is not supported in -source 1.5
Three questions:
What are the other hidden places to set JDK version?
Which setting wins if each place has a different setting?
How to specify not just JDK8, but JDK8u201?