blob: 9ed78e39d9972450b0db0a2428faf633c2551a1e [file] [log] [blame]
package org.apache.xbean.classpath;
/**
* @version $Revision$ $Date$
*/
import junit.framework.TestCase;
public class SystemClassPathTest extends TestCase {
public void testAddJarToPath() throws Exception {
SystemClassPath systemClassPath = new SystemClassPath();
ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
try {
systemClassLoader.loadClass("groovy.lang.GroovyShell");
fail("Class already exists");
} catch (ClassNotFoundException e) {
// this should fail
}
// URL groovyJar = new URL("http://www.ibiblio.org/maven/groovy/jars/groovy-SNAPSHOT.jar");
// systemClassPath.addJarToPath(groovyJar);
//
// try {
// systemClassLoader.loadClass("groovy.lang.GroovyShell");
// } catch (ClassNotFoundException e) {
// // this should fail pass
// fail("Class already exists");
// }
}
}