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 6243163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:05:18+00:00 2026-05-24T12:05:18+00:00

I read about properties and resource bundle. But I was unable to get difference

  • 0

I read about properties and resource bundle. But I was unable to get difference between these. When to use Properties file and when to use Resource bundle.

To load properties file use the following code

Properties tempProp = new Properties();
FileInputStream propsFile = new FileInputStream(xyz.properties);
tempProp.load(propsFile);

To load Resource bundle

ResourceBundle labels =
    ResourceBundle.getBundle("xyz", currentLocale);
Enumeration bundleKeys = labels.getKeys();

In both of the cases (in resource bundle and in Properites) we are using properties file. The one difference I found is that to store application specific data we use properties file and to use i18n data we use resource bundle. I don’t know whether i am right or not.

I would like to know the use of the above two. What is the difference between these two.

  • 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-05-24T12:05:18+00:00Added an answer on May 24, 2026 at 12:05 pm

    Yes, you’re thinking along the right lines.

    Resource bundles don’t have to use property files – it’s just one implementation (PropertyResourceBundle). A properties file is really just a string-to-string mapping – and that can be used for i18n, but doesn’t have to be.

    ResourceBundle gives you a consistent way of requesting the appropriate object (usually a string) for a particular locale, with fallbacks etc. This is often, but not always, backed by a separate property file for each language.

    So yes: if you’re dealing with i18n, you should use ResourceBundle; if you just need a string-to-string map persisted in a text file, it’s fine to use Properties directly.

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

Sidebar

Related Questions

I read about ContactsContract.CommonDataKinds.GroupMembership , but I can't figure out what URI use to
I read some tutorials here about properties ,but i still have some doubts to
I have read about how in ASP.NET 3.5 you can declare properties in C#
I just read about KnockoutJS and when I try to bind to sub-properties on
I've read about wicket:message here , but can't seem to make it do everything
I just considered using the new TDictionary type. But On QualityCentral I read about
I had watched Jose Smith video and read some tutorial about MVVM, but I
I've read about static vs. instance methods here, but I don't see any that
Read about Server push here . I want to push data to client from
I read about the Conditional attribute today. According to MSDN: Applying ConditionalAttribute to a

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.