Troubleshooting Class/Resource Loading on an Application Server

If you need to find out where is a certain class loaded from or where a class has loaded a resource (typically a configuration file) from, you can use the JSP below – just put it to your web app and point a browser to it.

Note: The resource loading tracking assumes that the loading class uses getClass().getResource – this doesn’t need to be always the case, it could also use the context class loader (Thread.currentThread().getContextClassLoader()) or load it as a system resource (ClassLoader.getSystemResource).

Update 08/11/06:  You can now get the ClassLoaderViewer.jsp from

Published by Jakub Holý

I’m a JVM-based developer since 2005, consultant, and occasionally a project manager, working currently with Iterate AS in Norway.