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
The NetBeans Modular Maven sample project fails to run and prints the exception shown below:
$ mvn clean javafx:jlink...[INFO] BUILD SUCCESS...
$ target/hellofx/bin/launcher Exception in Application start methodjava.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:464) at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)Caused by: java.lang.RuntimeException: Exception in Application start method at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900) at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195) at java.base/java.lang.Thread.run(Thread.java:830)Caused by: java.lang.IllegalStateException: Location is not set. at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2459) at javafx.fxml/javafx.fxml.FXMLLoader.load(FXMLLoader.java:2435) at [email protected]/org.openjfx.hellofx.App.loadFXML(App.java:32) at [email protected]/org.openjfx.hellofx.App.start(App.java:20) at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428) at java.base/java.security.AccessController.doPrivileged(AccessController.java:391) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427) at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96) at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277) ... 1 moreException running application org.openjfx.hellofx.App
The same error occurs when the application is launched from the IDE or with the command mvn clean javafx:run. I'm running under the following environment:
#!/bin/bash# Sets up the environment for building JavaFX applications
syspath=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# JavaFX Linux SDK and JMODsexport JAVAFX_SDK=$HOME/lib/javafx-sdk-13/lib
export JAVAFX_JMODS=$HOME/lib/javafx-jmods-13
export JAVA_HOME=$HOME/opt/jdk-13.0.1
export ANT_HOME=$HOME/opt/apache-ant-1.10.7
export GRADLE_HOME=$HOME/opt/gradle-6.0-rc-1
export PATH=$GRADLE_HOME/bin:$ANT_HOME/bin:$JAVA_HOME/bin:$syspath
I will follow up shortly with a pull request that fixes the problem.
The text was updated successfully, but these errors were encountered:
jgneff
added a commit
to jgneff/samples
that referenced
this issue
Oct 20, 2019
Fix two errors in package names:
1. java.lang.IllegalStateException: Location is not set.
The application loads the FXML resources relative to its own package
org.openjfx.hellofx, but the resources are not found because they are in
a different package, org.openjfx. The fix is either to get the resources
using their absolute names, such as "/org/openjfx/primary.fxml", or to
change their package name to org.openjfx.hellofx. This fix changes the
package name.
2. java.lang.module.InvalidModuleDescriptorException:
Package org.openjfx not found in module
The FXML classes use reflection to load the controllers in
org.openjfx.hellofx, but only the package org.openjfx, which contains no
code, is open to it. Fix the module descriptor to open the correct
package name of org.openjfx.hellofx.
Fixesopenjfx#39
The NetBeans Modular Maven sample project fails to run and prints the exception shown below:
The same error occurs when the application is launched from the IDE or with the command
mvn clean javafx:run
. I'm running under the following environment:I will follow up shortly with a pull request that fixes the problem.
The text was updated successfully, but these errors were encountered: