Okay, then I think you should investigate my replacement of the RMIClassLoaderSPI implementation with a pluggable mechanism.
public interface CodebaseClassAccess { public Class loadClass( String codebase, String name ) throws IOException, ClassNotFoundException; public Class loadClass(String codebase, String name, ClassLoader defaultLoader) throws IOException,ClassNotFoundException; public Class loadProxyClass(String codebase, String[] interfaceNames, ClassLoader defaultLoader ) throws IOException,ClassNotFoundException; public String getClassAnnotation( Class cls ); public ClassLoader getClassLoader(String codebase) throws IOException; public ClassLoader createClassLoader( URL[] urls, ClassLoader parent, boolean requireDlPerm, AccessControlContext ctx ); /** * This should return the class loader that represents the system * environment. This might often be the same as {@link #getSystemContextClassLoader()} * but may not be in certain circumstances where container mechanisms isolate certain * parts of the classpath between various contexts. * @return */ public ClassLoader getParentContextClassLoader(); /** * This should return the class loader that represents the local system * environment that is associated with never-preferred classes * @return */ public ClassLoader getSystemContextClassLoader( ClassLoader defaultLoader ); } I have forgotten what Peter renamed it to. But this base interface is what all of the Jini codebase uses to load classes. The annotation is in the “codebase” parameter. From this you can explore how the annotation can move from being a URL, which you could recognize and still use, but substitute your own indicator for another platform such as a maven or OSGi targeted codebase. Thus, you can still use the annotation, but use it to specify the type of stream instead of what to download via HTTP. Gregg > On Feb 4, 2017, at 2:02 AM, Michał Kłeczek (XPro Sp. z o. o.) > <michal.klec...@xpro.biz> wrote: > > My annotated streams replace codebase resolution with object based one (ie - > not using RMIClassLoader). > > Michal > > Gregg Wonderly wrote: >> Why specific things do you want your AnnotatedStream to provide? >> >> Gregg >> >> >