Thursday, October 16, 2008

Which JAR does my class run from?

The following code gets runtime JAR file name:
.class.getProtectionDomain().getCodeSource().getLocation().toString()

No comments:

Post a Comment