You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since JavaFX 20, importing an FXML file with <?language javascript?> fails with:
java.io.IOException: javafx.fxml.LoadException: JavaScript script engine is disabled.
/hello-script.fxml
at [email protected]/com.oracle.javafx.scenebuilder.kit.fxom.FXOMLoader.handleUnknownAndMissingCauses(FXOMLoader.java:119)
at [email protected]/com.oracle.javafx.scenebuilder.kit.fxom.FXOMLoader.handleFxmlLoadingError(FXOMLoader.java:114)
at [email protected]/com.oracle.javafx.scenebuilder.kit.fxom.FXOMLoader.load(FXOMLoader.java:106)
at [email protected]/com.oracle.javafx.scenebuilder.kit.fxom.FXOMDocument.<init>(FXOMDocument.java:119)
at [email protected]/com.oracle.javafx.scenebuilder.kit.editor.EditorController.updateFxomDocument(EditorController.java:2520)
at [email protected]/com.oracle.javafx.scenebuilder.kit.editor.EditorController.setFxmlTextAndLocation(EditorController.java:713)
at [email protected]/com.oracle.javafx.scenebuilder.app.DocumentWindowController.loadFromFile(DocumentWindowController.java:405)
at [email protected]/com.oracle.javafx.scenebuilder.app.SceneBuilderApp.performOpenFiles(SceneBuilderApp.java:739)
at [email protected]/com.oracle.javafx.scenebuilder.app.SceneBuilderApp.handleOpenFilesAction(SceneBuilderApp.java:538)
at [email protected]/com.oracle.javafx.scenebuilder.app.welcomedialog.WelcomeDialogWindowController.openFilesAndHideStage(WelcomeDialogWindowController.java:315)
at [email protected]/com.oracle.javafx.scenebuilder.app.welcomedialog.WelcomeDialogWindowController.attemptOpenExistingFiles(WelcomeDialogWindowController.java:308)
at [email protected]/com.oracle.javafx.scenebuilder.app.welcomedialog.WelcomeDialogWindowController.handleOpen(WelcomeDialogWindowController.java:350)
at [email protected]/com.oracle.javafx.scenebuilder.app.welcomedialog.WelcomeDialogWindowController.handleOpen(WelcomeDialogWindowController.java:291)
at [email protected]/com.oracle.javafx.scenebuilder.app.welcomedialog.WelcomeDialogWindowController.fireOpenRecentProject(WelcomeDialogWindowController.java:239)
at [email protected]/com.oracle.javafx.scenebuilder.app.welcomedialog.WelcomeDialogWindowController.lambda$loadAndPopulateRecentItemsInBackground$6(WelcomeDialogWindowController.java:200)
at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
at [email protected]/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
...
Caused by: javafx.fxml.LoadException: JavaScript script engine is disabled.
/hello-script.fxml
at [email protected]/javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2723)
at [email protected]/javafx.fxml.FXMLLoader.processLanguage(FXMLLoader.java:2810)
at [email protected]/javafx.fxml.FXMLLoader.processProcessingInstruction(FXMLLoader.java:2776)
at [email protected]/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2644)
at [email protected]/javafx.fxml.FXMLLoader.load(FXMLLoader.java:2552)
at [email protected]/com.oracle.javafx.scenebuilder.kit.fxom.FXOMLoader.load(FXOMLoader.java:104)
... 67 more
Since JavaFX 20, importing an FXML file with
<?language javascript?>
fails with:As per https://openjfx.io/javadoc/23/javafx.fxml/javafx/fxml/doc-files/introduction_to_fxml.html#scripting
Scene Builder needs to run with
-Djavafx.allowjs=true
The same applies to the test that was modified in #619:
https://github.com/gluonhq/scenebuilder/pull/619/files#diff-fcff3bec73ef52f202e23cb21a1e0fd095b82bf66b6940fa5ed5b7165fc159bdL3
Reverting this change will work passing the same
-Djavafx.allowjs=true
to the surefire<argLine/>
.The text was updated successfully, but these errors were encountered: