Getting the Class Location

Sometimes it is useful to know from where a class was loaded.

This can be done by changing the detail formatter of the class to

getClass().getProtectionDomain().getCodeSource().getLocation(); 

In the variables view of the debug perspective open the context menu:

edit detail formatter

Set the detail formatter

set detail formatter

Set a breakpoint where an instance of the class is available. The result can be seen in the variables view:

Do not forget to reset the detail formatter afterwards

References