• 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

wt is Properties file

Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
could you plzz explain me the use of Properties file exa
ctly in real time scenarios. if possible give the example.

thank you in advance.

Posts: 4335
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Properties files are used in numerous places since they allow you to change text attributes without recompiling code. Anytime you see text labels on JSP pages or swing pages for example, such as the "Post A Replay" I see at the top of my page, its a good idea to extract those out to properties files rather than whats referred to as 'hard-coding' them. Hard-coding means that in order to change them, someone must recompile the code.

As you work in larger and larger systems, recompiling the code (performing a build) becomes a big process and re-doing an entire build to change one text label becomes cumbersome. It also allows non-developers to control text labels without having to edit or even read code.

In addition, it is also used to store settings that can be quickly and easily changed during runtime such as database login name or password.
I miss the old days when I would think up a sinister scheme for world domination and you would show a little emotional support. So just look at this tiny ad:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic