public class TestMe {
@Test
public void getClassPath() throws IOException {
String classname = TestMe.class.getName().replace('.', '/') + ".class";
File file = new File(TestMe.class.getClassLoader().getResource(classname).getFile());
System.out.println(file.getAbsolutePath());
}
@Test
public void getResourcePath() throws IOException {
String resource = "go.txt";
File file = new File(TestMe.class.getClassLoader().getResource(resource).getFile());
System.out.println(file.getAbsolutePath());
}
}