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
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.