private static URL getFileURL(String fileName) {
    File file = new File(fileName).getAbsoluteFile();

    if (file.exists()) {
      try {
        return IOUtils.tryGetCanonicalFileElseGetAbsoluteFile(file).toURI().toURL();
      } catch (MalformedURLException ignore) {
      }
    }

    file = new File(System.getProperty("user.home"), fileName);

    if (file.exists()) {
      try {
        return IOUtils.tryGetCanonicalFileElseGetAbsoluteFile(file).toURI().toURL();
      } catch (MalformedURLException ignore) {
      }
    }

    return ClassPathLoader.getLatest().getResource(DistributedSystem.class, fileName);
  }
Gets an <code>URL</code> for the security properties file, if one can be found, that the
connect method will use as its properties file.
<p>
See {@link #SECURITY_PROPERTIES_FILE_PROPERTY} for information on the name of the properties
file and what locations it will be looked for in.

@return a <code>URL</code> that names the GemFire security properties file. Null is returned if
        no properties file was found.
@see #SECURITY_PROPERTIES_FILE_PROPERTY
@see #SECURITY_PROPERTIES_FILE_DEFAULT
@see #getSecurityPropertiesFile()
@since GemFire 6.6.2
geode-core/src/main/java/org/apache/geode/distributed/DistributedSystem.java