Here you can find the source of loadProperties(final File f)
Parameter | Description |
---|---|
f | property file to load |
Parameter | Description |
---|---|
IOException | property file not found |
public static Properties loadProperties(final File f) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Properties; public class Main { /**//from w w w . j a v a 2s . c o m * @param f property file to load * @return loaded property file * @throws IOException property file not found */ public static Properties loadProperties(final File f) throws IOException { Properties properties = new Properties(); properties.load(new FileInputStream(f)); return properties; } }