Java by API/java.security/CodeSource
CodeSource: getLocation()
public class Main {
public static void main(String args[]) {
Main m = new Main();
System.out.println(m.getClass().getName() + " is loaded from "
+ m.getClass().getProtectionDomain().getCodeSource().getLocation());
}
}