This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ResourceBundle

 
Marcel de Jong
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I'm having a problem with ResourceBundle.
I have some language specific messages to show to the user.
I create the ResourceBundle as follows:

The file is located in the package foo/resource/messages.properties.
However, I want to put the messages.properties file in a separate directory, which are at a higher level then the class files.
My class files are located at classes/foo/../..
I want the messages.properties file located in the directory /properties/
I've tried, I think, almost everything, but I still get the next error.

Anybody an idea how to fix this?
Thanks in advance.
Marcel
[ July 10, 2002: Message edited by: Marcel de Jong ]
 
Wilfried LAURENT
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well if you tell us you have tried almost everything, there is not much left
.
Be sure that the base directory where your resources files lie is mentioned in your CLASSPATH.
W.
 
Heath Lilley
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that in WebSphere and Visual Age you need to restart the webapp (In VAJ this means u must restart the WTE) inorder for it to find it again.
Somehow it gets cached and cannot be found if you move it with out restarting the webapp. Is the properties/ directory in the classes/ directory? I have never been able to .. my way out of a classpath directory and have the resources found. I think that the classes and resources must be under the classpath directory or sub directory.
Feel free if to let me know if I am wrong.
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this:

Put the property file 'messages.properties' in the folder 'properties' and add this folder to your CLASSPATH - then it should work.
/Rene
 
Marcel de Jong
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rene,
now its working.
i did try something like it before, but I forgot to set the classpath.
Thanks a lot.
Marcel
[ July 11, 2002: Message edited by: Marcel de Jong ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic