How to Read Config File in Java – with actual Class example provided

In my last post I mentioned “Config Class”couple of times.. here you will see actual class and its usage. The class is very simple. We just need to provide proper path to config file we going to use.

The Config

You can get any property/settings from config with method ‘getProperty’

Here is my config file

Usage:

Hope you find this useful..

Tags:,
16 Comments
  1. kouki
    February 21, 2014 | Reply
  2. April 22, 2013 | Reply
    • Pavan
      April 23, 2013 | Reply
      • July 26, 2013 | Reply
        • Pavan
          July 26, 2013 | Reply
          • July 29, 2013 |
  3. review web hosting hub
    January 19, 2013 | Reply
  4. Johnnyhurley1994
    January 16, 2013 | Reply
    • Pavan
      January 17, 2013 | Reply
  5. Sarang
    December 12, 2012 | Reply
  6. Sarang
    December 12, 2012 | Reply
  7. mayank99
    September 1, 2012 | Reply
    • Pavan
      December 13, 2012 | Reply
  8. DP
    August 9, 2012 | Reply
  9. Sachid
    April 20, 2012 | Reply
  10. yem
    November 13, 2010 | Reply

Leave a Reply to Sachid Cancel reply

Your email address will not be published. Required fields are marked *