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