gradle java9 Could not target platform: 'Java SE 9' using tool chain: 'JDK 8 (1.8)'

后端 未结 10 851
傲寒
傲寒 2020-12-11 14:39

I want to use java9 on my gradle project inside eclipse oxygen. When I run:

Run as> Gradle Test on  GreeterTest.java

with the followin

10条回答
  •  伪装坚强ぢ
    2020-12-11 15:21

    Additionally to the other ways you tried:

    Gradle has a default JVM set in your %userprofile%/.gradle/gradle.properties. This is in the folder "C:\Users\j.gradle\gradle.properties" for me:

    org.gradle.java.home=C:/Program Files/AdoptOpenJDK/jdk-11.0.7.10-hotspot
    

    That's where you should also put your newer JVM to make sure gradle can compile newer projects.

提交回复
热议问题