Class ClientClassLoader

All Implemented Interfaces:
Closeable, AutoCloseable

public class ClientClassLoader extends URLClassLoader
  • Field Details

    • nativePath

      public String nativePath
  • Constructor Details

    • ClientClassLoader

      public ClientClassLoader(URL[] urls)
      Constructs a new URLClassLoader for the specified URLs using the default delegation parent ClassLoader. The URLs will be searched in the order specified for classes and resources after first searching in the parent class loader. Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed.

      If there is a security manager, this method first calls the security manager's checkCreateClassLoader method to ensure creation of a class loader is allowed.

      Parameters:
      urls - the URLs from which to load classes and resources
      Throws:
      SecurityException - if a security manager exists and its checkCreateClassLoader method doesn't allow creation of a class loader.
      NullPointerException - if urls is null.
      See Also:
    • ClientClassLoader

      public ClientClassLoader(URL[] urls, ClassLoader parent)
      Constructs a new URLClassLoader for the given URLs. The URLs will be searched in the order specified for classes and resources after first searching in the specified parent class loader. Any jar: scheme URL is assumed to refer to a JAR file. Any file: scheme URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed.

      If there is a security manager, this method first calls the security manager's checkCreateClassLoader method to ensure creation of a class loader is allowed.

      Parameters:
      urls - the URLs from which to load classes and resources
      parent - the parent class loader for delegation
      Throws:
      SecurityException - if a security manager exists and its checkCreateClassLoader method doesn't allow creation of a class loader.
      NullPointerException - if urls is null.
      See Also:
  • Method Details