code: public static File getExecutionPath() throws OSException {
          try {
              return new File(OSUtils.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath());
          } catch (URISyntaxException ex) {
              throw new OSException(ex);
          }
      }
docs: Returns the execution path to the direcory of the current Java
  application.
  
  @return Execution path as {@link File}.
  @throws OSException If the execution path can't be determined.