public static void main(String[] args) throws Exception{
InputStream ips=new FileInputStream(getRealPath()+"count.properties");
Properties props=new Properties();
props.load(ips);
String className=props.getProperty("className");
Collection collections=(Collection) Class.forName(className).newInstance();
String a="q";
String b="w";
String c="e";
collections.add(a);
collections.add(b);
collections.add(c);
collections.add(b);
}
getRealPath()方法给怎么实现啊?
|
|