If the properties file is jarred up as com/utils/CLogger.properties.
Then the code should be as follows.

ResourceBundle rsb = ResourceBundle.getBundle("com.utils.CLogger", new
Locale("en", "UK"));

The properties file to be loaded has to mentioned with the package name
also.
Change the above line it will work..
--NDBabu

-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Venkata Reddy Vajrala
Sent: Friday, April 19, 2002 9:02 AM
To: [EMAIL PROTECTED]
Subject: Resouce Bundle


Hi,

I am trying to read a properties file from a simple class CLogger.java
using the following piece of code.
ResourceBundle rsb = ResourceBundle.getBundle("CLogger", new
Locale("en", "UK"));
The name of the properties file is "CLogger_en_UK.properties".

The package name for CLogger.java is "com.utils".

This is working fine when in stand alone mode, when I place both the
class file and properties file in the same folder.
(.../com/utils/CLogger.class and
.../com/utils/CLogger_en_UK.properties).
When I use the same class in a stateless SB, it is not able to
find the resource bundle.  I have placed the .properties file in the
classpath.
I am not allowed to put the .properties file in the same jar file
in which CLogger.class is placed.

How can we solve this issue?
By the way I am doing all this on WebSphre Application Server 4.0 AE.

thanks in advance,

Venkat.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to