• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

ResourceBundle  RSS feed

 
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 ]
 
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.
 
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.
 
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
Boost this thread!