Hello in this video we will show you How to resolve No Class Def Found Error : javax xml bind JAXBException in Java 11 or java 12
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 12, at runtime I get errors indicating that JAXB classes can not be found
so why can Java 11 no longer find these classes?
-
The JAXB APIs are considered to be Java EE APIs and therefore are no longer contained on the default classpath in Java SE 9. In Java 11, they are complete removed from the JDK.
Fortunately, these Java EE APIs that were provided in JDK 6/7/8 are still in the JDK, but they just aren't on the classpath by default.
So! wath is the Proper long-term solution:
What you will need to do in Java 11 and forward is include your own copy of the Java EE APIs on the classpath or module path. For example, you can add the JAX-B APIs as a Maven dependency
On this page of the site you can watch the video online How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java with a duration of hours minute second in good quality, which was uploaded by the user java tmz 13 February 2020, share the link with friends and acquaintances, this video has already been watched 4,195 times on youtube and it was liked by 16 viewers. Enjoy your viewing!