I am new with javafx
and eclipse . I installed eclipse then javafx from the eclipse market . I generated an fxml code with scene builder but I can not execute it . I m really blocked and couldnt find any soltution
I added --add-modules java.xml.bind
as an argument in run configuration , but no chance
Error occurred during initialization of boot layer
java.lang.module.FindException: Module java.xml.bind not found
With Java releases lower than Java 11, JAXB was part of the JVM and you could use it directly without defining additional libaries. As of Java 11, JAXB is not part of the JRE anymore and you need to configure the relevant libraries via your dependency management system, for example Maven or Gradle.
JAXB was integrated within the JVM itself, so you didn't need to add any code dependency to have the functionality within your application. But with the modularization performed in JDK 9, it was removed as the maintainers wanted to have a smaller JDK distribution that only contains the core concepts.
Package javax. xml. bind Description. Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
It defines static parse and print methods that provide access to a JAXB provider's implementation of parse and print methods. The static methods defined in the class can also be used to specify a parse or a print method in a javaType binding declaration.
This has been removed from the JDK with version 11+. You have to explicitly add some external dependencies to your project.
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.1</version>
<scope>runtime</scope>
</dependency>
And remove the --add-modules
directive.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With