javac: invalid target release: 1.8

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

    Your javac is not pointing to correct java.

    Check where your javac is pointing using following command -

    update-alternatives --config javac
    

    If it is not pointed to the javac you want to compile with, point it to "/JAVA8_HOME/bin/javac", or which ever java you want to compile with.

提交回复
热议问题