Java Properties Load from File loadProperties(String path)

Here you can find the source of loadProperties(String path)

Description

load Properties

License

Open Source License

Declaration

public static Properties loadProperties(String path) 

Method Source Code


//package com.java2s;
//License from project: MIT License 

import java.io.*;
import java.util.*;

public class Main {
    public static Properties loadProperties(String path) {
        Properties properties = new Properties();
        try {//from w w w .  java2s  .  com
            properties.load(new FileInputStream(path));
            return properties;
        } catch (IOException e) {
            throw new RuntimeException("Cannot open " + path);
        }
    }
}

Related

  1. loadProperties(String fileName)
  2. loadProperties(String fileName, boolean systemOverride)
  3. loadProperties(String fileName, Properties properties)
  4. loadProperties(String filePath)
  5. loadProperties(String filePath)
  6. loadProperties(String path, Class caller)
  7. loadProperties(String path, Properties defaults)
  8. loadProperties(String propertiesFile)
  9. loadProperties(String propertiesFile)