Java Properties Load from File loadProperties(String filePath)

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

Description

load Properties

License

Open Source License

Declaration

public static Properties loadProperties(String filePath) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.IOException;
import java.io.InputStream;

import java.util.Properties;

public class Main {

    public static Properties loadProperties(String filePath) throws IOException {

        InputStream inputStream = ClassLoader.getSystemResourceAsStream(filePath);

        Properties properties = new Properties();
        properties.load(inputStream);//  w w  w.j a  v a  2s.com
        inputStream.close();
        return properties;
    }
}

Related

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