Google search bar

October 14, 2008

Identifying the source of a java Class

My coworker, Mike, shared this with me. You can find out what jar a class is loaded from.
Class.forName("com.foo.MyClass")
.getProtectionDomain().getCodeSource()

No comments: