Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8493895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:08:47+00:00 2026-06-10T23:08:47+00:00

Yet again I am asking something for my project and I pretty much feel

  • 0

Yet again I am asking something for my project and I pretty much feel like I am a total newb in Java…
Anyway, I was recently told about ResourceBundle. My real problem is that I cannot understand the Oracle Documentation on the class in general and that I get some weird compile-time errors.
First off I made three Bundles mwb extends java.util.ResourceBundle, a second mwb_el extends mwb and a third mwb_en extends mwb. I made a contents variable of type Object[][] and wrote a method getContents() that return cotents;! Then I went into each class and changed the values for the second field in each line (not the key, the value). No I am stuck at a point that I cannot really get how to handle getting the values.
I checked some tutorials and examples but I got even more confused. What I need is someone to explain to me:

  1. How do I make the mwb object I create and initialize in a class get the locale I want
    it to.

  2. How do I get a certain value. I tried getObject(), getString() even
    the getContents() and even overriden the handleGetObject() to
    no avail.

    Thanks in advance! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T23:08:49+00:00Added an answer on June 10, 2026 at 11:08 pm

    Property file should have messages in key/value pairs.

    e.g

    key1=message1
    key2=message2
    

    If you have a resource file called “MessagesBundle_en_US.properties” you can load it as follows.

    Locale locale = new Locale("en", "US");
    ResourceBundle messages = ResourceBundle.getBundle("MessagesBundle", locale);
    

    then messages.getString("key1") should return “message1”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

feel like im coming here way too often to ask questions but yet again
yet again thanks for looking. i like to call a function (eg. comment_disp, post_disp
Yet again another issue with resizing, like many others I have used the CreateParams
Yes, I know this seems like the same question yet again, but give me
I've just added yet another 3rd-party component to my .net project that contains a
My apologies once again for asking another very junior question. For one reason or
Yet again another assignment I need help on. All i need is just the
Facebook just updated chat (yet again) and now a new fixed side bar stays
Yet again I find myself struggling with the C++ syntax. I'm trying to iterate
I yet again have a super weird problem. I get different outputs whether I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.