How to load or bundle property file in an java application
Dear All,
I have deployed my application in Oracle Application Server 10g. In my application i am trying to bundle the property file, but it throws the error "Can't bundle the property file".
I tried to put my property file in root folder of my application, same folder where i am bundle the property and home folder of the application server, but it throws the error "Can't bundle the property file".
Below is my code:
Properties ret = new Properties();
ResourceBundle rb= ResourceBundle.getBundle("XXX.properties);
for(Enumeration temp=rb.getKeys();temp.hasMoreElements();)
{
String onekey=new String((String)temp.nextElement());
ret.setProperty(onekey,(String)rb.getObject(onekey));
}
return ret;
Can any one help me to fix this problem.
regards,
MohdJaleel