I'm trying to load a properties files, but i keep getting this error:
Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name D:\\bdtej04694\\Mis documentos\\NetBeansProjects\\SMS_Clientes_Menores\\dist\\lib\\help.properties, locale es_VE at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1499) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1322) at java.util.ResourceBundle.getBundle(ResourceBundle.java:721)
I'm trying to making this
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
I searched on the web (and obviously, in this page), but i can't find an aswer to fit my problem
Thanks in advance
its seems you have problem with path of you properties file
D:\bdtej04694\Mis documentos\NetBeansProjects\SMS_Clientes_Menores\dist\lib\help.properties
try to avoid space in path of properties file, you have one here Mis documentos
regarding you comment :
change your path like below
String tempPath = directory+"\\dist\\lib\\help.properties";
String finalPath = tempPath.replace("\\", "/");
and use this finalPath
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.