org.apache.struts2
Class Main.MainClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by org.apache.struts2.Main.MainClassLoader
Enclosing class:
Main

public static class Main.MainClassLoader
extends java.net.URLClassLoader

Reverses the typical order of classloading to defer only to the parent if the current class loader can't be found. This is required to allow for the launcher to be embedded within struts.jar (otherwise the dependencies wouldn't be found by the system ClassLoader when invoking using "java -jar struts-core-VERSION.jar ...").


Constructor Summary
Main.MainClassLoader(java.net.URL[] urls)
           
 
Method Summary
 java.lang.Class<?> loadClass(java.lang.String name, boolean resolve)
           
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Main.MainClassLoader

public Main.MainClassLoader(java.net.URL[] urls)
Method Detail

loadClass

public java.lang.Class<?> loadClass(java.lang.String name,
                                    boolean resolve)
                             throws java.lang.ClassNotFoundException
Overrides:
loadClass in class java.lang.ClassLoader
Throws:
java.lang.ClassNotFoundException


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.