public static URL getJarURL() {
    java.security.CodeSource cs = GemFireVersion.class.getProtectionDomain().getCodeSource();
    if (cs != null) {
      return cs.getLocation();
    }
    // fix for bug 33274 - null CodeSource from protection domain in Sybase
    URL csLoc = null;
    StringTokenizer tokenizer = new StringTokenizer(getClassPath(), File.pathSeparator);
    while (tokenizer.hasMoreTokens()) {
      String jar = tokenizer.nextToken();
      if (jar.contains(getGemFireJarFileName())) {
        File gemfireJar = new File(jar);
        try {
          csLoc = gemfireJar.toURI().toURL();
        } catch (Exception ignored) {
        }
        break;
      }
    }
    if (csLoc != null) {
      return csLoc;
    }
    // try the boot class path to fix bug 37394
    tokenizer = new StringTokenizer(getBootClassPath(), File.pathSeparator);
    while (tokenizer.hasMoreTokens()) {
      String jar = tokenizer.nextToken();
      if (jar.contains(getGemFireJarFileName())) {
        File gemfireJar = new File(jar);
        try {
          csLoc = gemfireJar.toURI().toURL();
        } catch (Exception ignored) {
        }
        break;
      }
    }
    return csLoc;
  }
Public method that returns the URL of the gemfire jar file
geode-core/src/main/java/org/apache/geode/internal/GemFireVersion.java