package com.eb.common;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class PropertiesManage {
public String getProperty(String path,String key){
Properties p = new Properties();
try {
InputStream fin = new FileInputStream(path);
p.load(fin);
String value = p.getProperty(key);
return value;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}
}
public static void main(String arg[]){
PropertiesManage pm = new PropertiesManage();
System.out.println(pm.getProperty("D://ty//workspace//EJBTest//config//config.properties","cache.maxsize"));
}
}