Created
October 13, 2015 21:09
-
-
Save marcotc/8793899576a497d2c717 to your computer and use it in GitHub Desktop.
Get class location in Scala
This file contains 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
val klass = classOf[java.lang.Object] | |
val loc = ClassLoader.getSystemClassLoader.getResource(klass.getName().replace('.', '/') + ".class").toString() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment