If you need to work what location a class has been loaded from:
myclass.getClass().getProtectionDomain().getCodeSource().getLocation()

Java, JavaScript and other technology related stuff
If you need to work what location a class has been loaded from:
I have been looking for something like this for quite sometime. Thanks for easing my work.