Java Properties Load loadProperties(Properties p, String progname)

Here you can find the source of loadProperties(Properties p, String progname)

Description

load Properties

License

Open Source License

Declaration

public static void loadProperties(Properties p, String progname) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.*;
import java.util.*;

public class Main {
    public static void loadProperties(Properties p, String progname) {
        String fileName = (progname + ".properties");
        try {/*w w w  . j  a  va  2 s .  c o  m*/
            InputStream is = new FileInputStream(fileName);
            p.load(is);
            is.close();
        } catch (IOException e) {
            System.err.println("Cannot read " + fileName);
            return;
        }
    }
}

Related

  1. loadProperties()
  2. loadProperties(ByteSource is)
  3. loadProperties(Class clazz, String name)
  4. loadProperties(Class clazz)
  5. loadProperties(Class clazz, String name)
  6. loadProperties(Properties properties, Class clazz, String propDir, String name)
  7. loadProperties(Properties properties, Class baseClass, String... propertiesName)
  8. loadProperties(Properties props, final Class clazz, final String resourceName)
  9. loadProperties(String bucketName, String key)