code: private File detectHomeDir() throws Exception {
      String path = getClass().getProtectionDomain().getCodeSource().getLocation().getFile();
      path = URLDecoder.decode(path, "UTF-8");
      return new File(path).getParentFile().getParentFile().getCanonicalFile();
    }
docs: Detect the home directory, which is expected to be <tt>../../</tt> from the location of the jar containing this
  class.