org.wamblee.classloading
Class ClassLoaderUtils

java.lang.Object
  extended by org.wamblee.classloading.ClassLoaderUtils

public class ClassLoaderUtils
extends java.lang.Object

Utility for adding jars to the system class loader.


Constructor Summary
ClassLoaderUtils()
           
 
Method Summary
static void addFile(java.io.File aFile)
          Adds a file to the classpath.
static void addFile(java.lang.String aFilename)
          Adds a file to the classpath.
static void addJarsInDirectory(java.io.File aDirectory)
          Adds all jars in the given directory to the class path.
static void addURL(java.net.URL aUrl)
          Adds a url to the classpath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassLoaderUtils

public ClassLoaderUtils()
Method Detail

addJarsInDirectory

public static void addJarsInDirectory(java.io.File aDirectory)
                               throws java.io.IOException
Adds all jars in the given directory to the class path.

Parameters:
aDirectory - Directory.
Throws:
java.io.IOException

addFile

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

Parameters:
aFilename - Filename to add.
Throws:
java.io.IOException

addFile

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

Parameters:
aFile - File to add.
Throws:
java.io.IOException

addURL

public static void addURL(java.net.URL aUrl)
                   throws java.io.IOException
Adds a url to the classpath.

Parameters:
aUrl - Url to add.
Throws:
java.io.IOException


Copyright © 2022. All Rights Reserved.