Class ExtensionClassLoader

All Implemented Interfaces:
Closeable, AutoCloseable

public class ExtensionClassLoader extends URLClassLoader
ClassLoader for loading QuPath extensions and other jars from the user directory.
Author:
Pete Bankhead
  • Method Details

    • getInstance

      public static ExtensionClassLoader getInstance()
      Get a singleton instance of the ExtensionClassLoader.
      Returns:
      Since:
      v0.5.0
    • getExtensionsDirectory

      public Path getExtensionsDirectory()
      Directory containing extensions. This can contain any jars - all will be added to the search path when starting QuPath.
      Returns:
    • refresh

      public void refresh()
      Ensure all Jars in the extensions directory (and one subdirectory down) are available
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class URLClassLoader
      Throws:
      IOException