code: private File getJarPath() {
          String decodedPath = ".";
          String jarPath = "";
          final ProtectionDomain domain = Settings.class.getProtectionDomain();
          if (domain != null && domain.getCodeSource() != null && domain.getCodeSource().getLocation() != null) {
              jarPath = Settings.class.getProtectionDomain().getCodeSource().getLocation().getPath();
          }
          try {
              decodedPath = URLDecoder.decode(jarPath, StandardCharsets.UTF_8.name());
          } catch (UnsupportedEncodingException ex) {
              LOGGER.trace("", ex);
          }
  
          final File path = new File(decodedPath);
          if (path.getName().toLowerCase().endsWith(".jar")) {
              return path.getParentFile();
          } else {
              return new File(".");
          }
      }
docs: Attempts to retrieve the folder containing the Jar file containing the
  Settings class.
  
  @return a File object