Here you can find the source of loadSystemProperty(String evn, String fileName)
public static Properties loadSystemProperty(String evn, String fileName)
//package com.java2s; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Properties; public class Main { public static Properties loadSystemProperty(String evn, String fileName) { String tomcatHome = System.getProperty(evn); System.out.println("tomcat home:[" + tomcatHome + "]"); String setupFile = tomcatHome + File.separatorChar + "conf" + File.separatorChar + fileName; System.out.println("system config file:" + setupFile); Properties prop = new Properties(); InputStream is = null;//from www. j av a 2 s. c om try { is = new FileInputStream(new File(setupFile)); prop.load(is); } catch (Exception e) { e.printStackTrace(); } finally { if (is != null) { try { is.close(); } catch (IOException e) { e.printStackTrace(); } } } return prop; } }