Class DirectoryClassLoader

java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.glassfish.common.util.GlassfishUrlClassLoader
com.sun.enterprise.admin.cli.DirectoryClassLoader
All Implemented Interfaces:
Closeable, AutoCloseable

public class DirectoryClassLoader extends org.glassfish.common.util.GlassfishUrlClassLoader
A class loader that loads classes from all jar files in a specified directory.
  • Constructor Details

    • DirectoryClassLoader

      public DirectoryClassLoader(Set<File> jarsAndDirs, ClassLoader parent)
      Initializes a new instance by the jarsAndDirs, filtered and ordered by file names.
      Parameters:
      jarsAndDirs -
      parent - - parent has higher priority.
    • DirectoryClassLoader

      public DirectoryClassLoader(File dir, ClassLoader parent)
      Create a DirectoryClassLoader to load from jar files in the specified directory, with the specified parent class loader.
      Parameters:
      dir - the directory of jar files to load from
      parent - the parent class loader