public static File findGemFireLibDir() {
    URL jarURL = GemFireVersion.getJarURL();
    if (jarURL == null) {
      return null;
    }
    String path = jarURL.getPath();
    // Decode URL to get rid of escaped characters. See bug 32465.
    path = URLDecoder.decode(path);
    File f = new File(path);
    if (f.isDirectory()) {
      return f;
    }
    return f.getParentFile();
  }
Finds the gemfire jar path element in the given classpath and returns the directory that jar is
in.
geode-core/src/main/java/org/apache/geode/internal/SystemAdmin.java