This rule flags the use of the com.sun.xml.internal.bind.* packages. These packages
are no longer available in Java SE 11. These packages are internal and are not intended for
external use. However, if the application must continue using these packages, a possible solution is
to instead use the com.sun.xml.bind.* packages and include the required jaxb dependency
libraries in the application. The following is a sample of the maven dependency file to pull in the
required library to use the com.sun.xml.bind.* package:
| <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-core</artifactId> <version>2.2.11</version> </dependency> <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-impl</artifactId> <version>2.2.11</version> </dependency> |
For more information on the Java 11 changes, see The Java 11 Migration Guide. For more information the removal of the com.sun.xml.bind directory, see the JEP entry for the Removal of the Java EE and CORBA Modules.