Class JRubyClassLoader

All Implemented Interfaces:
Closeable, AutoCloseable, ClassDefiningClassLoader
Direct Known Subclasses:
SelfFirstJRubyClassLoader

public class JRubyClassLoader extends ClassDefiningJRubyClassLoader
this classloader will be populated dynamically in the following ways:
  • JRuby.runtime.jruby_class_loader.add_url( java.net.URL.new( "file:my.jar" )
  • $CLASSPATH << 'path/to/class/or/resources'
  • require 'some.jar'
  • load 'some.jar'
so it is the classloader for ALL the jars used by gems. and this classlaoder is "implicit" part of the $LOAD_PATH of the jruby runtime all ruby resources inside any of the added jars will be found via require and load
  • Constructor Details

    • JRubyClassLoader

      public JRubyClassLoader(ClassLoader parent)
  • Method Details

    • addURL

      public void addURL(URL url)
      Overrides:
      addURL in class URLClassLoader
    • getTempDir

      public static File getTempDir()
    • close

      public void close()
      Called when the parent runtime is torn down.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class URLClassLoader
    • terminateJarIndexCacheEntries

      protected void terminateJarIndexCacheEntries()
    • getJDBCDriverUnloader

      @Deprecated public Runnable getJDBCDriverUnloader()
      Deprecated.