javac: invalid target release: 1.8

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

提交回复
热议问题