Not only you need to change it in File>ProjectStructure>Project
AND in File>ProjectStructure>SDK
but
also in GradleWindow>Gradle settings...>Gradle>GradleJVM
- gradle :
println("java version: "+ JavaVersion.current());
- Java sourcecode :
String version = System.getProperty("java.version"); logger.info("JavaVersion="+version);