### Question:
JarUtils { public static String getJarPath (Class<?> cls) throws URISyntaxException { return new File(cls.getProtectionDomain().getCodeSource().getLocation().toURI()).getPath(); } protected  JarUtils(); static File getJarFileOfClass(Class<?> cls); static String getJarPath(Class<?> cls);  }### Answer:
@Test public void testGetJarPath () throws URISyntaxException { String path = JarUtils.getJarPath(JarUtilsTest.class); System.out.println("jar path: " + path); assertNotNull(path); assertEquals(false, path.isEmpty()); }