I'm experiencing a weird behaving in Eclipse when working with JavaFx, when I modify a FXML document in SceneBuilder, I save the changes, but when I run the project, my changes don't appear, it s after I refresh the concerned Fxml document that the changes work when I run the application, I'm obliged to do this every time I change something using SceneBuilder, any explanation or solution for this problem ?
You can edit an FXML file using the Eclipse FXML editor or by opening the file using the JavaFX Scene Builder tool: In the IDE's Package Explorer tab, expand the Test1 and src folders. Right-click the node for the Sample. fxml file and select Open with Scene Builder, as shown in Figure 3-6.
FXML is an XML-based user interface markup language created by Oracle Corporation for defining the user interface of a JavaFX application. FXML presents an alternative to designing user interfaces using procedural code, and allows for abstracting program design from program logic.
The problem is that Eclipse does NOT by default track external changes to files and when you execute an application you are not executing the stuff in the "src" folder but the one that gets copied by eclipse to your "bin" one.
You can turn on active polling of sources on in the Eclipse Preferences page "General > Workspace" by checking "Refresh using native hooks or polling".
If you create a project with option:
"Use project folder as root for sources and class files"
selected, you don't have that problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With