• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

ResourceBundle

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
World domination requires a hollowed out volcano with good submarine access. Tiny ads are optional.
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic