javac: invalid target release: 1.8

前端 未结 15 818
死守一世寂寞
死守一世寂寞 2021-01-30 12:22

I recently downloaded JDK 1.8.0.0_06 that comes bundled with NetBeans. I then got to find out that my JavaFx project, that I have been developing in Java 1.7 won\'t compile in J

15条回答
  •  借酒劲吻你
    2021-01-30 12:50

    If this error occurs when running a Gradle (or Maven) task, you need to modify that build tool configuration to point to your installation of Java JDK 1.8 following this route:

    File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle

    There you check the Linked Gradle project is the one you are working on and select the Gradle JVM (You missed this when you imported the gradle project into IntelliJ)

    Remember when importing a Gradle (or Maven) project to set the target JVM correctly here:

提交回复
热议问题