How to Read Config File in Java – With Actual Class Example rovided

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 File Class

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

Here is my config sample file

Usage:

I hope you find this useful. If you wish to read more Java articles from our site visit this.

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

Add a Comment

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