I must say that I am not much familiar with Java, I am working on assignment for my university classes.
I want to make a Desktop Application with JavaFX and SceneBuilder, I'm using this tutorial on YouTube: https://www.youtube.com/watch?v=DH3dWzmkT5Y
Everything is working fine until in 17:25 he created module-info.java file
module HotelBookingSystemTest1 {
requires javafx.graphics;
requires javafx.fxml;
requires javafx.controls;
requires java.sql;
requires mysql.connector.java;
opens sample;
}
I do the same in my project, but after running I am getting this error:
/home/prem/.jdks/openjdk-15.0.2/bin/java --module-path /home/prem/Downloads/javafx-sdk-16/lib --add-modules javafx.controls,javafx.fxml -Djava.library.path=/home/prem/Downloads/javafx-sdk-16/lib -javaagent:/snap/intellij-idea-community/289/lib/idea_rt.jar=44433:/snap/intellij-idea-community/289/bin -Dfile.encoding=UTF-8 -m HotelBookingSystemTest1/sample.Main
Error occurred during initialization of boot layer
java.lang.module.FindException: Module HotelBookingSystemTest1 not found
Process finished with exit code 1
I'm pretty sure that I put the file in the right place, here is my project directories tree:
Could someone help me with fixing that error and explain why this is happening? Thank you!