wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Beginning locales ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Beginning locales ..." Watch "Beginning locales ..." New topic
Author

Beginning locales ...

Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Hi,

I'm getting the following exception :



And here's my source code :



I think that the location where i have places the messages.properties file is wrong.

In eclipse, i have create a folder named bundles and placed it there.

Please can you guide me on where to put the .properties files and how to instruct the compiler reading them ?

Thanks in advance ...


Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Marimuthu Madasamy
Ranch Hand

Joined: Jun 07, 2007
Posts: 72

The properties file should be available in the classpath. In eclipse, the properties file in the source folder will automatically be copied into the output folder. So either you can place the properties file in the existing source folder or you can add the folder which contains it as a source folder.

1) assume 'src' is your source folder and you have,

${PROJECT ROOT} -> src -> bundle -> messages.properties

then the code should be,



2) assume 'src' is your folder,
${PROJECT ROOT} -> src and ${PROJECT ROOT} -> bundle -> messages.properties

You are now adding 'bundle' as source folder in addition to 'src' then your code should be,



- Marimuthu Madasamy
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Beginning locales ...
 
Similar Threads
Help with I18N
comparing two dates
internationalization help!
Override request headers
Seam: Injection doesn't work in custom validator