InputStream in = this.getClass().getResourceAsStream(Constants.RESOURCE_NAME_DEVICES_CONFIG);
InputStream in = this.getClass().getResourceAsStream("/" + Constants.RESOURCE_NAME_DEVICES_CONFIG);
	public DevicesConfig() {		// Load properties file		InputStream in = this.getClass().getResourceAsStream(Constants.RESOURCE_NAME_DEVICES_CONFIG);		//Properties configProps = new Properties();		try {			configProps.load(in);		}		catch (IOException e) {			ErrorMsg.reportError("Failed Loading Devices",								 "Failed loading devices property file. "								 + "Resource " + Constants.RESOURCE_NAME_DEVICES_CONFIG								 + " cannot be loaded", e);		}		finally {			try {				in.close();			}			catch (IOException e) {				// do nothing			}		}		//configProps.propertyNames()		Enumeration propNames = configProps.propertyNames();		while (propNames.hasMoreElements())		{			String propName = (String)propNames.nextElement();			if (propName.startsWith(Constants.PROP_PREFIX_DEVICE_NAME)) {				String deviceKey = propName.substring(					Constants.PROP_PREFIX_DEVICE_NAME.length());				String deviceName = configProps.getProperty(propName);				String deviceClass = configProps.getProperty(					Constants.PROP_PREFIX_DEVICE_CLASS + deviceKey);				if ((deviceName==null) || (deviceClass==null)) {					ErrorMsg.reportError("Failed loading Devices",										 "Config file inconsistency found "										 + "for '" + deviceKey + "' device");				}				else {					deviceProps.setProperty(deviceName, deviceClass);					this.deviceNames.add(deviceName);				}			}                        if (propName.startsWith(Constants.PROP_PREFIX_ID_STRING)) {				String deviceKey = propName.substring(					Constants.PROP_PREFIX_ID_STRING.length());				String deviceName = configProps.getProperty(Constants.PROP_PREFIX_DEVICE_NAME+deviceKey);				String IDString = configProps.getProperty(					Constants.PROP_PREFIX_ID_STRING + deviceKey);				if ((deviceName==null) || (IDString==null)) {					ErrorMsg.reportError("Failed loading Devices",										 "Config file inconsistency found "										 + "for '" + deviceKey + "' ID string");				}				else {					deviceIDProps.setProperty(IDString,deviceName);					//this.deviceNames.add(deviceName);				}			}		}		Collections.sort(this.deviceNames);	}