To use this ClassLoader as the System ClassLoader you must set the JVM system property java.system.class.loader to the fully qualified class name (org.apache.accumulo.classloader.vfs.ReloadingVFSClassLoader). This jar and it's dependent jars must be on the java.class.path.
To set the classpath for this ClassLoader you must define the system property vfs.class.loader.classpath and set it to locations that are supported by Apache Commons VFS.
The ClassLoader monitors the classpath for changes at 5 minute intervals. To change this interval define the sytem property vfs.classpath.monitor.seconds.
This ClassLoader follows the normal parent delegation model but can be set to load classes and resources first, before checking if the parent classloader can, by setting the system property vfs.class.loader.delegation to “post”.
Finally, this ClassLoader keeps a local cache of objects pulled from remote systems (via http, etc.). The default location for this cache directory is the value of the system property java.io.tmpdir. To change this location set the system property vfs.cache.dir to an existing directory.
This ClassLoader maintains a VFSClassLoader delegate that references the classpath (as specified by vfs.class.loader.classpath). The ReloadingVFSClassLoader implements FileListener and creates a DefaultFileMonitor that checks for changes on the classpath at the interval specified by vfs.classpath.monitor.seconds and creates a new VFSClassLoader delegate. Future requests to load classes and resources will use this new delegate; the old delegate is no longer referenced (except by the classes it has loaded) and can be garbage collected.