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
Class theClass = Cluster.class; | |
// Find the path of the compiled class | |
String classPath = theClass.getResource(theClass.getSimpleName() + ".class").toString(); | |
System.out.println("Class: " + classPath); | |
// Find the path of the lib which includes the class | |
String libPath = classPath.substring(0, classPath.lastIndexOf("!")); | |
System.out.println("Lib: " + libPath); |