• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

wt is Properties file

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
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.

regards,
srinivas.
 
author
Posts: 4335
39
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.
reply
    Bookmark Topic Watch Topic
  • New Topic