您的位置:首页 > 其它

虚拟化--039 vsphere Esxi主机如何加入域

2015-08-20 17:00 411 查看
public class ReadResourceProperties {
private static Properties p = new Properties();
//在同一级目录下,路径文件的写法
// private static String filepath="my.properties";
//在src 根目录下文件的写法
private static String filepath="/my.properties";
//在别的目录下路径写法
// private static String filepath="/com/other/my.properties";
static{
InputStream fin = ReadResourceProperties.class.getResourceAsStream(filepath);
try {
p.load(fin);
} catch (IOException e) {
e.printStackTrace();
}finally{
if(null!=fin)
try {
fin.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
public static String getProperty(String key){
return p.getProperty(key);
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: