Here you can find the source of loadProperties(URL url)
public static Properties loadProperties(URL url)
//package com.java2s; //License from project: Apache License import java.io.InputStream; import java.net.URL; import java.util.Properties; public class Main { public static Properties loadProperties(URL url) { //log.info("loadJNDIProperties() started: "+name); Properties props = null;/*from ww w. j a va2s . c o m*/ try { //log.info("loadJNDIProperties() opening file: "+name); InputStream stream = url.openStream(); props = new Properties(); //log.info("loadJNDIProperties() loading file: "+stream); props.load(stream); } catch (Exception e) { //log.error(e); } finally { //log.info(props); } //log.info("loadJNDIProperties() returns: "+props); return props; } }