code: private static Properties loadPropertiesFromClasspath(String propertiesFile) {
      Properties properties = new Properties();
      try (InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(propertiesFile)) {
        properties.load(is);
      } catch (IOException e) {
        throw new RuntimeException("failed to load properties", e);
      }
      return properties;
    }
docs: Loads properties from a properties file on the classpath.