> Just so I have it clear. Someone has packaged the annotations with the > JAX-RS classes and -Xpatch:java.annotations.common=<jar> is used to patch > them into java.annotations.common module, is that right?
The jar with annotations is a maven dependency, here: http://repo1.maven.org/maven2/org/jboss/resteasy/jaxrs-api/3.0.10.Final/ This jar contains: javax.annotation.Priority javax.ws.rs.* (subpackages and classes) So it's definitely not consistent. I added the following to command line to make it all run: -Xpatch:java.annotations.common=[...]/jaxrs-api-3.0.10.Final.jar -XaddExports:java.annotations.common/javax.ws.rs=ALL-UNNAMED -XaddExports:java.annotations.common/javax.ws.rs.client=ALL-UNNAMED ... (other subpackages from javax.ws.rs.*) > I think explains things as the interface will not be accessible outside of > that module and > why the generated Proxy class is not accessible. The interface is available outside of the module -- it is used (and is visible) to all classes. The proxy class created for this interface isn't (or rather: the reflective call to the proxy's constructor fails, like explained in the javadoc you pointed to). > URLClassLoader does parent delegation so I assume the types in package > javax.annotation are being split between loaders. This is not going to work > if there package private access is required. These are annotations only, so no package private access is required. It certainly works, unlike the tests (because I can run it and see that it does). Dawid