This content has been marked as final.
Show 5 replies
-
1. Re: How do you load a properties file
c_eric_ray Aug 25, 2006 5:21 PM (in response to c_eric_ray)This does not work either
ResourceBundle bundle = ResourceBundle.getBundle("my");
where properties file name is my.properties and it's even located in the same package.
why does this NOT work? -
2. Re: How do you load a properties file
peterj Aug 25, 2006 5:49 PM (in response to c_eric_ray)Based on your post, I would expect the following to work:
ResourceBundle bundle = ResourceBundle.getBundle("com.company.product.unit.my"); -
3. Re: How do you load a properties file
c_eric_ray Aug 25, 2006 5:55 PM (in response to c_eric_ray)yes. you are correct. any ideas why the getResourceAsStream method does not work.
thanks. -
4. Re: How do you load a properties file
peterj Aug 25, 2006 5:59 PM (in response to c_eric_ray)Maybe that was getting a more global class loader. You could try this.getClass().getClassLoader().getResourceAsStream(...);
-
5. Re: How do you load a properties file
c_eric_ray Aug 25, 2006 6:23 PM (in response to c_eric_ray)tries that too. didnt' work. any way, it works using ResourceBundle. thanks.