class ConfigProperties {

    public static void loadProperties(String propFile) {
        
        Properties prop = new Properties();
        try (InputStream is = new FileInputStream(propFile)) {
            prop.load(is);
        } catch (Exception ex) {
            throw new RuntimeException("Error while loading " + propFile, ex);
        }
        
        if (prop.isEmpty()) {
            throw new RuntimeException("No data set in " + propFile);
        }
        
        LOGGER.info("Loading system properties from {}...", propFile);
        Enumeration<?> enumeration = prop.propertyNames();
        while (enumeration.hasMoreElements()) {
            String key = (String) enumeration.nextElement();
            String value = prop.getProperty(key);
            
            if (!value.isEmpty()) {
                System.setProperty(key, value);
                LOGGER.info("property name={}, value={}", key, value);
            }
        }
    }

}