Home > Java > javaTutorial > body text

Why am I getting an `IllegalAccessError` when creating a Label in JavaFX 11?

Barbara Streisand
Release: 2024-11-03 06:31:30
Original
490 people have browsed it

Why am I getting an `IllegalAccessError` when creating a Label in JavaFX 11?

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template