Question: How would you go about establishing where a class ( or maybe resource ) has been loaded from?

I am trying to work out exactly where a class has been loaded from. Does anyone know if you can find out the following:

1. Which Jar file did the class come from ?
2. What classloader loaded the file?

Answer: 
You can get an URL by calling MyClass.class.getResource("MyClass.class") for instance.
i think you will get the answer here : 

<http://www.jugpadova.it/articles/2005/11/13/from-which-jar-a-class-was-loaded>

<http://www.techtalkz.com/java/102114-how-find-jar-file-ava-class-all-successorshad-been-loaded.html>