org.eu.sk.zero.acd
Class JarClassLoader

java.lang.Object
  |
  +--java.lang.ClassLoader
        |
        +--java.security.SecureClassLoader
              |
              +--java.net.URLClassLoader
                    |
                    +--org.eu.sk.zero.acd.JarClassLoader

public class JarClassLoader
extends URLClassLoader

A class loader for loading jar files, both local and remote.

Version:
$Id: JarClassLoader.java,v 1.2 2003/05/04 19:02:22 robo Exp $

Constructor Summary
JarClassLoader(URL url)
          Creates a new JarClassLoader for the specified url.
 
Method Summary
 Object createClassInstance(String name)
          Creates and returns instance of main class of the jar file
 String getMainClassName()
          Returns the name of the jar file main class, or null if no "Main-Class" manifest attributes was defined.
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, 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

JarClassLoader

public JarClassLoader(URL url)
Creates a new JarClassLoader for the specified url.

Parameters:
url - the url of the jar file
Method Detail

getMainClassName

public String getMainClassName()
                        throws IOException
Returns the name of the jar file main class, or null if no "Main-Class" manifest attributes was defined.

IOException

createClassInstance

public Object createClassInstance(String name)
                           throws ClassNotFoundException,
                                  InstantiationException
Creates and returns instance of main class of the jar file

ClassNotFoundException
InstantiationException