code: public static String getJarDir(Class<?> clazz) {
          return decodeUrl(new File(clazz.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent());
      }
docs: Get Jar location
  
  @param clazz
  Based on class location
  @return String