Java Properties Load from File loadSettings(String propertiesFileName)

Here you can find the source of loadSettings(String propertiesFileName)

Description

load Settings

License

Open Source License

Declaration

public static void loadSettings(String propertiesFileName) throws IOException 

Method Source Code


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

import java.io.File;
import java.io.FileInputStream;

import java.io.IOException;
import java.util.Properties;

public class Main {
    private static final String HOME_DIR = System.getProperty("user.home");
    public static final Properties PROGRAM_SETTINGS = new Properties();

    public static void loadSettings(String propertiesFileName) throws IOException {
        File propertiesFile = new File(HOME_DIR + File.separator + propertiesFileName);
        if (propertiesFile.exists()) {
            PROGRAM_SETTINGS.load(new FileInputStream(propertiesFile));
        }//from www .j a va2s . co  m
    }
}

Related

  1. loadPythonScript(String pythonScriptName)
  2. loadReader(Reader stream)
  3. loadRecursively(String propertiesFilename)
  4. loadRQGProperties()
  5. loadSetting(InputStream in, String key)
  6. loadStrictly(File file)
  7. loadSystemProperty(String evn, String fileName)
  8. loadTestProperties(String filename)
  9. loadToStringFromFile(String fullFileName)