Module java.xml.bind not found

Viewed 11999

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
1 Answers

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.

Related