I have downloaded the aspectJ.jar file and extracted it into a temp directory (this jar file is used for test purposes only). I have the following code:
public class TestUrlClassLoader { public static void main(String [] args) throws MalformedURLException, ClassNotFoundException { File file = new File("C:\\temp\\org\\aspectj\\lang\\JoinPoint.class"); URLClassLoader loader = URLClassLoader.newInstance(new URL[]{file.toURI().toURL()}); Class<?> aClass = loader.loadClass("org.aspectj.lang.JoinPoint"); System.out.println(aClass.toString()); } } A file with JoinPoint class exists, but I get a ClassNotFoundException. Can anybody help me?