ClassNotFoundException when loading Controller via FXML [message #1099826] |
Mon, 02 September 2013 05:10  |
Eclipse User |
|
|
|
Hi,
I just stumbled across a tiny inconvenience: When I start building my current ap as a plain JavaFX application, I build the FXGraph and respectivly the FXML with the controller already specified within. This worked fine.
Now I migrated to the OSGi based approach and was confronted with the named Exception. Funny enough within the FXGraph, it was found (and it is there!). So when I change the approach from the FXGraph based approach
component Root controlledby my_package.app.ui.RootController
to the Java internal
FXMLLoader fxmlLoader = new FXMLLoader();
fxmlLoader.setResources(bundle);
RootController controller = new RootController();
fxmlLoader.setController(controller);
this.rootWindow = (BorderPane) fxmlLoader.load(this.getClass().getResource("layout/Root.fxml").openStream());
it works as intended.
This is weird and I currently have no idea at all, why this is happening. Do you?
Thanks and greetings,
Daniel
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09325 seconds