Java tutorial
//package com.java2s; //License from project: Apache License import java.util.HashMap; import java.util.Map; import java.util.Properties; public class Main { public static Map<String, String> propertiesToMap(Properties properties) { final Map<String, String> result = new HashMap<String, String>(); for (final Object propKey : properties.keySet()) { result.put(propKey.toString(), properties.getProperty(propKey.toString())); } return result; } }