Properties Files & Different Locations

Discussion in 'Java' started by Jason Cavett, Apr 23, 2008.

  1. Jason Cavett

    Jason Cavett Guest

    I'm working on an application that, while generic (with respect to the
    problem its solving), requires different terminology depending on what
    field its being used in. So, I want to provide the ability to skin
    the application through a properties file. I currently provide a way
    for the user to select a skin (which I hope to have in a ZIP file -
    but I haven't determined that yet). I have not yet finished the
    skinning feature because of my follow up question...

    Using a ResourceBundle, how do I load up that resource so it uses the
    skin the user has selected (assume it can be anywhere on the disk).
    I've seen something like this when I externalize Strings in Eclipse,
    but the messages.properties file is located within Eclipse.

    private static final String BUNDLE_NAME =
    "com.company.filehandler.messages";
    private static final ResourceBundle RESOURCE_BUNDLE =
    ResourceBundle .getBundle(BUNDLE_NAME);

    I'm unsure of how to pass in the "messages.properties" file that a
    user may want from their skin. (It gets even more confusing when I
    want to skin the icons as well.)


    Thanks for any help or direction.
    Jason Cavett, Apr 23, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sam-I-Am
    Replies:
    2
    Views:
    288
    Steven Cheng[MSFT]
    May 11, 2004
  2. =?Utf-8?B?TWF0dA==?=
    Replies:
    0
    Views:
    359
    =?Utf-8?B?TWF0dA==?=
    May 20, 2004
  3. =?Utf-8?B?TWF0dA==?=
    Replies:
    3
    Views:
    502
    Mike Smith
    Jul 20, 2004
  4. =?Utf-8?B?TWF0dA==?=
    Replies:
    0
    Views:
    321
    =?Utf-8?B?TWF0dA==?=
    Jul 20, 2004
  5. Kent P. Iler
    Replies:
    6
    Views:
    388
    Kent P. Iler
    Oct 6, 2004
Loading...

Share This Page