Skip to content

Commit 5a2addc

Browse files
committed
Add system property (resource base directory) for find resources
1 parent a939199 commit 5a2addc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/root/javafx/DI/DependencyInjection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public static Parent load(String location) throws IOException {
2626
}
2727

2828
public static FXMLLoader getLoader(String location) {
29-
return new FXMLLoader(DependencyInjection.class.getResource(location), bundle, new JavaFXBuilderFactory(),
30-
controllerClass -> constructController(controllerClass));
29+
return new FXMLLoader(DependencyInjection.class.getResource(System.getProperty("resourceBaseDir") + location),
30+
bundle, new JavaFXBuilderFactory(), controllerClass -> constructController(controllerClass));
3131
}
3232

3333
public static void setBundle(ResourceBundle bundle) {

0 commit comments

Comments
 (0)