jar读取外部的配置文件如perperties

来源:互联网 发布:如何淘宝开企业店铺 编辑:程序博客网 时间:2024/04/28 06:18
private static ResourceBundle rb;private static BufferedInputStream inputStream;static {//rb = ResourceBundle.getBundle("xcc.resourceBundle");String proFilePath = System.getProperty("user.dir") + "\\config\\resourceBundle.properties";try {inputStream = new BufferedInputStream(new FileInputStream(proFilePath));rb = new PropertyResourceBundle(inputStream);} catch (FileNotFoundException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();}}

0 0
原创粉丝点击