Wednesday, July 2, 2008

Find the path of class being loaded


java.net.URL codeBase = (Class).getClass().getProtectionDomain().getCodeSource().getLocation();
System.out.println(codeBase.getPath());

No comments: