Here you can find the source of loadProps(URL url, Properties props)
public static void loadProps(URL url, Properties props) throws Exception
//package com.java2s; /******************************************************************************* * Copyright (c) 2004, 2005 Sybase, Inc. and others. * * 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 * * Contributors://from ww w. j av a 2 s.co m * Sybase, Inc. - initial API and implementation *******************************************************************************/ import java.io.InputStream; import java.net.URL; import java.util.Properties; public class Main { public static void loadProps(URL url, Properties props) throws Exception { InputStream inputStream = null; if (url != null) { inputStream = url.openStream(); } else { System.out.println("Props File not Found"); } props.load(inputStream); } }