properties file

Converting a Java properties file to a Map (example)

At the moment I can't remember why I wrote this method to read a Java properties file and return it as a Map of key/value pairs ... but if for some reason you happen to need a Java method that reads a properties file and returns the contents as a Map, here's some free source code for you:

A Java Properties file method

In an earlier Java Properties file example I showed how to load a Java Properties file and then access the elements in the Properties object, but for today, if you just need a method to read a Java Properties file, I hope the following source code will be helpful to you:

How to read a Java Properties file alvin October 1, 2001 - 7:27pm

Java Properties file FAQ: Can you show me how to read a Java Properties file?

Here is a snippet of Java source code that shows how to read a Java Properties file named It reads in two properties named CRUST and TOPPINGS.: