dcsimg

How can i find out which JAR file or Directory from where my class was loaded?

Davanum Srinivas

class Test {
  public static void main (String args[]) {
	System.out.println("Loaded Test from:" + Test.class.getProtectionDomain().getCodeSource().getLocation());
  }
}