Last updatedMay 28, 2020

Rate this page:

How do I check which jar file a class file belong to?

How do I check which Jar file a class file belong to?

Knowing a jar file where a stack trace originates from can be handy when troubleshooting for library conflict. If you want to find out, this can be easily done using user macros.

For example:

You can copy and paste the following code, which is the same as the screenshot above:


If the macro is run, it will print the path of the loaded jar file in your application server ie. the above user macro will print the file path to the jar file where org.apache.commons.lang.StringUtils class belongs.

Rate this page: