Created
May 4, 2018 12:34
-
-
Save stevebakh/c5fa6097053f1739304d5b8a6754671d to your computer and use it in GitHub Desktop.
Find the filepath of the jar containing a particular class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // without instance: | |
| classOf[SomeClass].getProtectionDomain.getCodeSource.getLocation.toURI.getPath | |
| // with instance: | |
| someClassInstance.getClass.getProtectionDomain.getCodeSource.getLocation.toURI.getPath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment