如何将自定义ResourceBundle读取的文件路径设置为长尾词?
- 内容介绍
- 文章标签
- 相关推荐
本文共计87个文字,预计阅读时间需要1分钟。
plaintextprivate static ResourceBundle rb;private static BufferedInputStream inputStream;static { String proFilePath=System.getProperty(user.dir) + \\config\\resourceBundle.properties; try { inputStream=new BufferedInputStream(new FileInputStream(proFilePath)); } catch (FileNotFoundException e) { e.printStackTrace(); }}
private static ResourceBundle rb; private static BufferedInputStream inputStream; static { String proFilePath = System.getProperty("user.dir") +"\\config\\resourceBundle.properties"; try { inputStream = new BufferedInputStream(new FileInputStream(proFilePath)); rb = new PropertyResourceBundle(inputStream); inputStream.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
本文共计87个文字,预计阅读时间需要1分钟。
plaintextprivate static ResourceBundle rb;private static BufferedInputStream inputStream;static { String proFilePath=System.getProperty(user.dir) + \\config\\resourceBundle.properties; try { inputStream=new BufferedInputStream(new FileInputStream(proFilePath)); } catch (FileNotFoundException e) { e.printStackTrace(); }}
private static ResourceBundle rb; private static BufferedInputStream inputStream; static { String proFilePath = System.getProperty("user.dir") +"\\config\\resourceBundle.properties"; try { inputStream = new BufferedInputStream(new FileInputStream(proFilePath)); rb = new PropertyResourceBundle(inputStream); inputStream.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }

