Java tutorial
public class Main { public static void main(String args[]) { new ThreadDemo(); } } class ThreadDemo implements Runnable { ThreadDemo() { Thread t = new Thread(this); t.start(); ClassLoader c = t.getContextClassLoader(); // sets the context ClassLoader for this Thread t.setContextClassLoader(c); System.out.println("Class = " + c.getClass()); System.out.println("Parent = " + c.getParent()); } public void run() { } }