Finding out where a class has been loaded from

If you need to work what location a class has been loaded from:

myclass.getClass().getProtectionDomain().getCodeSource().getLocation()

One Reply to “Finding out where a class has been loaded from”

Leave a Reply to Aman Prakash Mohla Cancel reply

Your email address will not be published. Required fields are marked *