Here you can find the source of load(Properties props, Collection
public static void load(Properties props, Collection<String> filters, File basedir) throws IOException
//package com.java2s; /******************************************************************************* * Copyright (c) 2011 Sonatype, Inc./*ww w . jav a 2 s . c o m*/ * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Collection; import java.util.Properties; public class Main { public static void load(Properties props, Collection<String> filters, File basedir) throws IOException { for (String filter : filters) { File propFile = new File(filter); if (!propFile.isAbsolute()) { propFile = new File(basedir, filter).getAbsoluteFile(); } FileInputStream is = new FileInputStream(propFile); try { props.load(is); } finally { is.close(); } } } }