net.uidl
Class ClassPathHacker

java.lang.Object
  extended by net.uidl.ClassPathHacker

public class ClassPathHacker
extends java.lang.Object

Useful class for dynamically changing the classpath, adding classes during runtime.

Author:
unknown

Constructor Summary
ClassPathHacker()
           
 
Method Summary
static void addFile(java.io.File f)
          Adds a file to the classpath
static void addFile(java.lang.String s)
          Adds a file to the classpath.
static void addURL(java.net.URL u)
          Adds the content pointed by the URL to the classpath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassPathHacker

public ClassPathHacker()
Method Detail

addFile

public static void addFile(java.lang.String s)
                    throws java.io.IOException
Adds a file to the classpath.

Parameters:
s - a String pointing to the file
Throws:
java.io.IOException - if URL can't be opened

addFile

public static void addFile(java.io.File f)
                    throws java.io.IOException
Adds a file to the classpath

Parameters:
f - the file to be added
Throws:
java.io.IOException - if URL can't be opened

addURL

public static void addURL(java.net.URL u)
                   throws java.io.IOException
Adds the content pointed by the URL to the classpath.

Parameters:
u - the URL pointing to the content to be added
Throws:
java.io.IOException - if URL can't be opened