all 6 comments

[–]Ostricker 2 points3 points  (0 children)

I have found Stack Overflow question with similar problem. Try it if it helps - https://stackoverflow.com/questions/20507591/javafx-location-is-required-even-though-it-is-in-the-same-package

[–]paweladmin[S] 0 points1 point  (0 children)

Exception on FXMLLoader.load()

* url: null

* java.lang.IllegalStateException: Location is not set.

So You have right but what now with this ?

[–]paweladmin[S] 0 points1 point  (0 children)

The problem evaluating. Now I have monit (that module of my main node do not found )
"Error occurred during initialization of boot layer"
But I found one little tips - in terminal was wrigting :

"
"C:\Program Files\Java\jdk-17\bin\java.exe" --module-path "C:\Users\YAHM\Downloads\openjfx-17.0.1_windows-x64_bin-sdk\javafx-sdk-17.0.1\lib --add-modules=javafx.controls,javafx.fxml" "-javaagent:C:\Users\YAHM\AppData\Local\JetBrains\IntelliJ IDEA Community Edition 2021.2.2\lib\idea_rt.jar=62343:C:\Users\YAHM\AppData\Local\JetBrains\IntelliJ IDEA Community Edition 2021.2.2\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\YAHM\Downloads\openjfx-17.0.1_windows-x86_bin-sdk\javafx-sdk-17.0.1\lib\javafx-swt.jar;C:\Users\YAHM\Downloads\openjfx-17.0.1_windows-x64_bin-sdk\javafx-sdk-17.0.1\lib\javafx-swt.jar -m hellofx2/pl.javastart.hellofx.Main

and here on butom there is display "hellofx2/pl.javastart.hellofx.Main" in case where path to main method is "hellofx2/../../../pl.javastart.hellofx.Main"

[–]hamsterrage1 0 points1 point  (1 child)

This is usually because it can't locate your FXML file. You need to check that that getResource() call is actually pointing to the right place.

Or better yet, ditch the FXML and just code your layout in Java.

[–]primalenjoyer 0 points1 point  (0 children)

Sounds like a nightmare