diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/SchemaGenerator.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/SchemaGenerator.java index cc875821adf..1fdf164f717 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/SchemaGenerator.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/SchemaGenerator.java @@ -140,6 +140,9 @@ public class SchemaGenerator { aptargs.add("-cp"); aptargs.add(setClasspath(options.classpath)); // set original classpath + jaxb-api to be visible to annotation processor + aptargs.add("-addmods"); + aptargs.add("java.xml.bind"); + if(options.targetDir!=null) { aptargs.add("-d"); aptargs.add(options.targetDir.getPath()); diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java index 6d7564c967c..a325b3455a1 100644 --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java @@ -162,6 +162,8 @@ public class WsgenTool { boolean bootCP = useBootClasspath(EndpointReference.class) || useBootClasspath(XmlSeeAlso.class); List args = new ArrayList(6 + (bootCP ? 1 : 0) + (options.nocompile ? 1 : 0) + (options.encoding != null ? 2 : 0)); + args.add("-addmods"); + args.add("java.xml.ws"); args.add("-d"); args.add(options.destDir.getAbsolutePath()); args.add("-classpath"); diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java index b6e3f843905..410cf89904d 100644 --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java @@ -525,6 +525,8 @@ public class WsimportTool { String classpathString = createClasspathString(); boolean bootCP = useBootClasspath(EndpointContext.class) || useBootClasspath(JAXBPermission.class); List args = new ArrayList(); + args.add("-addmods"); + args.add("java.xml.ws"); args.add("-d"); args.add(classDir); args.add("-classpath");