code: public static File lookupJarFile() {
          try {
              return new File(OptionsAndArgs.class
                                      .getProtectionDomain()
                                      .getCodeSource()
                                      .getLocation()
                                      .toURI());
          } catch (URISyntaxException e) {
              throw new IllegalStateException("Error: Cannot lookup jar for this class: " + e,e);
          }
      }
docs: Lookup the JAR File from where this class is loaded
  
  @return File pointing to the JAR-File from where this class was loaded.