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.
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 3.1 last modified by Geoff Fortytwo on 14/05/2008 at 00:40
Document data
Attachments:
No attachments for this document