Home » Java » How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9

How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9

Posted by: admin October 21, 2018 Leave a comment

Questions:

I have some code that uses JAXB API classes which have been provided as a part of the JDK in Java 6/7/8. When I run the same code with Java 9, at runtime I get errors indicating that JAXB classes can not be found.

The JAXB classes have been provided as a part of the JDK since Java 6, so why can Java 9 no longer find these classes?

Answers: