Want to find which jar a java class is coming from? Then do this:

Class clazz = Class.forName("com.sleepycat.je.DatabaseException");
java.security.ProtectionDomain dom = clazz.getProtectionDomain();
java.security.CodeSource cs = dom.getCodeSource();
java.net.URL url = cs.getLocation();
out.println(url.toString());

Of course, replace "com.sleepycat.je.DatabaseException" with whatever class you're looking for.
Version 4.1 last modified by Geoff Fortytwo on 14/05/2008 at 01:17

Attachments 0

No attachments for this document

Creator: Geoff Fortytwo on 2008/05/12 01:18
This wiki is licensed under a Creative Commons license
1.3.2.9174