javac: invalid target release: 1.8

前端 未结 15 767
死守一世寂寞
死守一世寂寞 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 13:04

    Just do this. Then invalidate IntelliJ caches (File -> Invalidate Caches)

    0 讨论(0)
  • 2021-01-30 13:05

    I got the same issue in IntelliJ IDEA Community with Maven and I had to reimport the project by right-clicking the project in the Project tab -> Maven -> Reimport

    0 讨论(0)
  • 2021-01-30 13:07
    1. Download JDK 8.
    2. Edit your env var for JAVA_HOME to point to the new installed JDK 1.8: R-click on My Computer -> Properties -> Advanced System Settings -> Environment Variables find JAVA_HOME on the list and set it's value to something like that:

      C:\Program Files\Java\jdk1.8.0_31
      
    3. Find the old version and edit it in PATH variable aswell.

    4. Probably you will need to restart the system.

    Should be done.

    0 讨论(0)
提交回复
热议问题