虚拟化--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);
}
}
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);
}
}
相关文章推荐
- oc- 字典 集合
- iOS 给collectionView增加Header
- CodeForces 508D Tanya and Password欧拉路径
- 把linux可执行程序做成一个服务
- 两种流行的Spring定时器
- 遍历Json返回的数据几种方法
- Puppet3在CentOS6.5集群下的安装
- 查看linux cpu和内存利用率
- ListView的HeaderView
- AVL的插入过程
- 虚拟化--038 vsphere ESXI升级方法
- 约瑟夫问题的Python和C++求解方法
- JQuery中,.val()与 .attr("","");的区别,以及placeholder与value冲突
- android 自定义TextView"会发脾气的TextView"
- iOS博客地址,很多资料
- python开发之Tkinter可视化
- MyBatis/Ibatis中#和$的区别
- HDU 1029.Ignatius and the Princess IV【数据弱鸡】【咦,水题!】【8月20】
- mac电脑jdk版本切换
- DOM(二)-07-DOM(示例-创建表格)