Closed Clashsoft closed 4 months ago
This can be fixed by adding the following snippet, which grants unnamed modules access to the javafx module, to the build.gradle
of the application:
run {
jvmArgs = jvmArgs + ['--add-opens=javafx.graphics/javafx.scene=ALL-UNNAMED']
}
Describe the bug When launching an app using
gradlew run
, it fails with a cryptic messageException in Application start method
. Changing thecatch (Exception e)
inApp.start
toThrowable
reveals this:To Reproduce Steps to reproduce the behavior:
gradlew run
any app.Expected behavior No exception.
Additional context The error is a
ExceptionInInitializerError
because the code fails in thestatic { }
block of theReflectionUtil
class. Thus thecatch (Exception e)
does not work.