자바 클래스패스 가져오기
String sPath = System.getProperty("java.class.path");
System.out.println(sPath);
// 결과 : /home/udell/workspace/170112ClusteringEx/target/test-classes:/home/udell/workspace/170112ClusteringEx/target/classes:/home/udell/.p2/pool/plugins/org.junit_4.12.0.v201504281640/junit.jar:/home/udell/.p2/pool/plugins/org.hamcrest.core_1.3.0.v201303031735.jar:...
// 분리
String[] classpathEntries = sPath.split(File.pathSeparator);
sPath = new File(".").getAbsolutePath();
System.out.println(sPath);
// 결과 : /home/udell/workspace/170112ClusteringEx/.
sPath = this.getClass().getResource("Prac_1_Mahout.class").toString();
System.out.println(sPath);
// 결과 : file:/home/udell/workspace/170112ClusteringEx/target/classes/com/dogcowking/dev/prac/Prac_1_Mahout.class
sPath = new File(this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath()).getAbsolutePath();
System.out.println(sPath);
// 결과 : /home/udell/workspace/170112ClusteringEx/target/classes