Here you can find the source of loadProperties(String configurationPath)
Parameter | Description |
---|---|
configurationPath | The local path of the properties file. |
public static Properties loadProperties(String configurationPath) throws Exception
//package com.java2s; //License from project: Apache License import java.io.FileInputStream; import java.util.Properties; public class Main { /**// w ww . java2 s . c o m * Load the properties for the application. * @param configurationPath The local path of the properties file. * @return The properties object. */ public static Properties loadProperties(String configurationPath) throws Exception { Properties props = new Properties(); try (FileInputStream inputStream = new FileInputStream(configurationPath)) { props.load(inputStream); } return props; } }