【发布时间】:2015-04-13 15:02:22
【问题描述】:
我正在尝试加载属性文件,但我不断收到此错误:
线程“主”java.util.MissingResourceException 中的异常:不能 查找基本名称 D:\bdtej04694\Mis 的捆绑包 文档\NetBeansProjects\SMS_Clientes_Menores\dist\lib\help.properties, 语言环境 es_VE 位于 java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1499) 在 java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1322) 在 java.util.ResourceBundle.getBundle(ResourceBundle.java:721)
我正在尝试做这个
private static PropertyResourceBundle slInfo = null;
//and in another method i'm doing this
String directory = System.getProperty("user.dir");
slInfo = (PropertyResourceBundle)ResourceBundle.getBundle(directory+"\\dist\\lib\\help.properties");
//I put it on a different folder, just in case i want to make changes in the connection strings inside the properties files, without build the project again in netbeans
我在网上搜索过(很明显,在这个页面上),但我找不到适合我的问题的答案
提前致谢
【问题讨论】:
标签: java resourcebundle properties-file netbeans-8 missingmethodexception