I wrote custom class loader which loads jar file from the file system.
the customClassLoader
override the load and the find method and its working by
How can I make all the code after the definition of the class loader to work with the customClassLoader in context of the method execute.
Once I run this code in the method f1()
I get this error java.lang.NoClassDefFoundError org.xml.dd.myclass
How can I define that in context of the method execute all the time I will work with customClassLoader
Public void execute()
{
ClassLoader customClassLoader= new customClassLoader();
try
{
Class.forName("org.xml.dd.myclass", true, xdmCustomClassLoader);
}
catch (ClassNotFoundException e2)
{
// TODO Auto-generated catch block
e2.printStackTrace();
}
Thread.currentThread().setContextClassLoader(customClassLoader);
………………….
F1();
F2();
}