读取配置文件

public static String getProValue(String path,String name)
{
String value = "";
try
{
FileInputStream is=new FileInputStream(new File(path));
Properties props = new Properties();
props.load(is);
value = props.getProperty(name);
is.close();
}
catch (Exception e)
{
System.out.println("getProValue:"+e.toString());
}
return value;
}

你可能感兴趣的:(读取配置文件)