private static Manifest loadManifest() {
    String resourceName = Dropship.class.getName().replace('.', '/') + ".class";
    URL location = Dropship.class.getResource(resourceName);
    if (location == null) {
      return null;
    }

    try {
      String classPath = location.toString();
      if (!classPath.startsWith("jar")) {
        // Class not from JAR
        return null;
      }
      String manifestPath = classPath.substring(0, classPath.lastIndexOf("!") + 1) + "/META-INF/MANIFEST.MF";
      return new Manifest(new URL(manifestPath).openStream());
    } catch (MalformedURLException e) {
      return null;
    } catch (IOException e) {
      return null;
    }
  }