Java ClassLoader loadGuiConfiguration(String configurationFilename)

Here you can find the source of loadGuiConfiguration(String configurationFilename)

Description

load Gui Configuration

License

Open Source License

Declaration

public static Properties loadGuiConfiguration(String configurationFilename) 

Method Source Code

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

import java.io.FileInputStream;

import java.net.URL;
import java.net.URLDecoder;
import java.util.Properties;

public class Main {
    public static Properties loadGuiConfiguration(String configurationFilename) {
        try {/*  w ww  .  j  a  va2 s  .co  m*/
            URL configurationURL = Thread.currentThread().getContextClassLoader()
                    .getResource(configurationFilename);
            String configurationFile = URLDecoder.decode(configurationURL.getFile(), "ISO-8859-1");
            Properties properties = new Properties();
            properties.load(new FileInputStream(configurationFile));
            return properties;
        } catch (Exception e) {
            throw new IllegalArgumentException("could not load [" + configurationFilename + "]");
        }
    }
}

Related

  1. load(String propertiesName)
  2. load(String propsName)
  3. loadAttachApi()
  4. loadCorrectedConfiguration(String configurationFilename)
  5. loadFile(String file)
  6. loadProperties(File inFile)
  7. loadProperties(final String configFile, final String chainProperty)
  8. loadProperties(final String location)
  9. loadProperties(String propFile)