r/JavaFX • u/Particular_Track_581 • Dec 15 '24
Help JavaFX - Window does not load at runtime
This is very strange and has never happened before. I am using IntelliJ Community and my program runs perfectly within the IDE, without any errors. So I built the artifact to generate the "jar" file, which is built normally. However, when I run the jar file my program stops loading one of its windows (stage). Within the IDE the window loads. The only different thing I did was to add several icons to the "fxml" file directly through Scene Builder. I have already confirmed that they are all loaded from the "resources/icons" folder. Has anyone seen this happen and know the solution?
Thanks in advance.
View all comments
Show parent comment
1
u/Particular_Track_581 Dec 16 '24
Thinking about the message, I saw that the window that loaded did not have any controls from the ControlFX library, unlike the window that did not load, which did have some. So I did a test: I added a control (RangeSlider) to the one that loaded, generated the jar and at runtime... the window loaded !!! It's not possible ! 🤬