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();

Of course, replace "com.sleepycat.je.DatabaseException" with whatever class you're looking for.
Version 5.1 last modified by Geoff Fortytwo on 11/07/2010 at 19:22

Attachments 0

No attachments for this document
Website Top
Send Me Mail!:
   g42website4 AT g42.org
My Encyclopaedia Blog

Creator: Geoff Fortytwo on 2008/05/12 01:18
Copyright 2004-2007 (c) XPertNet and Contributing Authors