Hi all I have a question about the jre classloader . In my work of jre osgi , I have to implement a new classloader to load the classes since the classloading mechanism is very different from the default one . So I am thinking of the Thread.currentThread().setContextClassloader(myclassloader), but this is not very useful. for example [1] , the stdout will print systemclassloader or null depends on the class to load .. So how to make sure that a " new ClassLoader " will use my classloader instead of loading every one using myClassLoader.loadClass(String)
[1] Thread.currentThread().setContextClassloader(myclassloader), ClassType object = new ClassType(); system.out.println(object.getClass().getClassLoader()) -- regards Tian
