Here you can find the source of loadDefault(String _file_path)
public static Properties loadDefault(String _file_path)
//package com.java2s; /*// www .ja v a 2 s. co m * Copyright 2010 Antoine Seilles (Natoine) * This file is part of properties-utils. model-annotation is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. model-annotation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with model-annotation. If not, see <http://www.gnu.org/licenses/>. */ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Properties; public class Main { public static Properties loadDefault(String _file_path) { // create and load default properties Properties defaultProps = new Properties(); FileInputStream in; try { in = new FileInputStream(_file_path); defaultProps.load(in); in.close(); } catch (FileNotFoundException e) { System.out.println("[PropertiesUtils.loadDefault] no properties file to load for default properties"); e.printStackTrace(); } catch (IOException e) { System.out.println("[PropertiesUtils.loadDefault] pb with file to load for default properties"); e.printStackTrace(); } // create application properties with default return new Properties(defaultProps); } }