[ https://issues.apache.org/jira/browse/NETBEANS-4718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17179971#comment-17179971 ]
Ernie Rael commented on NETBEANS-4718: -------------------------------------- This issue first turned up in thread [http://mail-archives.apache.org/mod_mbox/netbeans-users/202008.mbox/%3C1732072939.1651138.1597416076300%40mail.yahoo.com%3E] Use NB to create an fxml project, and then add an empty fxml file, in particular: # File->New Project->Java with Maven->FXML JavaFx Maven Archetype (Gluon)->.... # File ->New File -> JavaFX->Empty FXML->....->Use Java Controller->...->Finish Using the dialog defaults; the default package for FXML.fxml file is "fxml", default for controller is "". This results in {code:java} In <projdir>/src/main ./resources/fxml/FXML.fxml ./java/FXMLController.java {code} and in FXML.fxml there is {code:java} fx:controller=".FXMLController {code} which is higlighted with the error :Class does not exist: .FXMLController". And the execution fails with {code} --- javafx-maven-plugin:0.0.4:run (default-cli) @ fxml-bug --- Error occurred during initialization of boot layer java.lang.module.FindException: Error reading module: C:\f\tmp\fxml-bug\target\classes Caused by: java.lang.module.InvalidModuleDescriptorException: FXMLController.class found in top-level directory (unnamed package not allowed in module) Command execution failed. {code} With the cursor over the package, play.fxml.bug in my case, the dialog still has "fxml","" as defaults. Selecting the package in the two places in the dialog, play.fxml.bug, gives {code} ./java/play/fxml/bug/FXMLController.java ./resources/play/fxml/bug/FXML.fxml {code} The execution succeeds > The default package for generated FXML file in maven based JavaFx application > is not detected > --------------------------------------------------------------------------------------------- > > Key: NETBEANS-4718 > URL: https://issues.apache.org/jira/browse/NETBEANS-4718 > Project: NetBeans > Issue Type: Bug > Components: apisupport - Maven, javafx - Project > Affects Versions: 12.0 > Environment: Windows 10 > Reporter: Anthony Romano > Priority: Major > Fix For: Next > > > In the Maven-based JavaFx project in Netbeans 12.0, the system generated FXML > file in the default package of ${Project}\src\main\resources\fxml is not > detected and leads to a Runtime exception when the app tries to load the FXML > file using the FXMLLoad.load() API. As a workaround the developer needs to > copy the FXML file from the aforementioned default directory to the > src\main\resources\org\openjfx\${Project} folder so the build process can > process this file. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists