java - JavaFX loader location not set -Plugin Development -


as part of plugin creating using javafx scenebuilder create gui. however, when use budle.getresource("symboltable.fxml") , load file error "location not set" or else changing "could not load src/.../symboltable.fxml".

when place fxml file resource directory loader works fine need have fxml file in package structure allow setting controller class.

@override public void start(stage stage) throws exception {     try {          this.primarystage = stage;         this.primarystage.settitle("common symbol table");         // load person overview.         fxmlloader loader = new fxmlloader();         loader.setlocation(bundle.getresource("symboltable.fxml"));         anchorpane symbolanchor = (anchorpane) loader.load();         // show scene containing root layout.         scene scene = new scene(symbolanchor);         primarystage.setscene(scene);         primarystage.show();         // give controller access main app.         //symboltablecontroller controller = loader.getcontroller();         //controller.setmainapp(this);      } catch (ioexception e) {       e.printstacktrace();     } } 

even when adding package class path same error occurs. path?

its strange loads fxml fine when placed in res/ directory.

here classpath:

source.. = src/ output.. = bin/ bin.includes = meta-inf/,\ .,\ icons/,\ lib/sphinx4-core-1.0-snapshot.jar,\ lib/sphinx4-data-1.0-snapshot.jar,\ lib/opencv-300.jar,\ res/,\ lib/org.eclipse.fx.ide.css.jfx8_1.1.0.201411050807.jar jars.compile.order = . 


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -