9

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
  • Which version of Java are you using to run your JavaFX application? Commented Oct 22, 2019 at 2:04

1 Answer 1

7

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.

Sign up to request clarification or add additional context in comments.

3 Comments

This gets more complicated at every turn.
Where to add this??
@Saurabh, I just searched for .xml files, and within them, for one with "<dependency>" tags.. The application did launch then but not past the splash :-) I just needed this to run a medical image viewer which comes along with Your X-ray images, but it turned out there is a package Aeskulap which can open DICOM files without trying to compile weasis :-D

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.