I'm trying to import Alert class but doesnt work. Does Java 1.8.0_31 has the javafx.scene.control.Alert class can I import it to my project
Does Java 1.8.0_31 has the javafx.scene.control.Alert class how can I import it to my project
2.5k Views Asked by Faseem At
1
Java 1.80_31 doesn't have Alert. If you go through the JavaDoc of Alert and scroll down, at the end of class description you will find the since tag which says
JavaFX 8u40
. As JavaFX follows theupdate version of Java
, it means it is available sinceJava 1.8.0_40
.You need to use Java version greater than or equal to
Java 8 update 40
to use Alert in your project.