JavaFX 11: IllegalAccessError when creating Label
Question:
An IllegalAccessError occurs when trying to add a Label to a StackPane in a JavaFX application.
Answer:
JavaFX 11 is not included with the JDK, so the JavaFX SDK must be added as a library and configured with the following VM options:
`
<br>-p <path-to-javafx-sdk>/lib --add-modules javafx.base,javafx.graphics,javafx.controls<br>`
The above is the detailed content of Why am I getting an `IllegalAccessError` when creating a Label in JavaFX 11?. For more information, please follow other related articles on the PHP Chinese website!