private void loadConfiguration() throws IOException,
			ClassNotFoundException, InstantiationException,
			IllegalAccessException {
		final FileInputStream fis = new FileInputStream(
				"data/configuration.cfg");
		try {
			final ConfigurationParser p = new ConfigurationParser(fis);
			final Map<String, String> mappings = p.getMappings();
			if (mappings.containsKey("worldLoader")) {
				final String worldLoaderClass = mappings.get("worldLoader");
				final Class<?> loader = Class.forName(worldLoaderClass);
				this.loader = (WorldLoader) loader.newInstance();
				logger.fine("WorldLoader set to : " + worldLoaderClass);
			} else {
				loader = new GenericWorldLoader();
				logger.fine("WorldLoader set to default");
			}
			final Map<String, Map<String, String>> complexMappings = p
					.getComplexMappings();
			if (complexMappings.containsKey("packetHandlers")) {
				final Map<Class<?>, Object> loadedHandlers = new HashMap<Class<?>, Object>();
				for (final Map.Entry<String, String> handler : complexMappings
						.get("packetHandlers").entrySet()) {
					final int id = Integer.parseInt(handler.getKey());
					final Class<?> handlerClass = Class.forName(handler
							.getValue());
					Object handlerInstance;
					if (loadedHandlers.containsKey(handlerClass)) {
						handlerInstance = loadedHandlers.get(loadedHandlers
								.get(handlerClass));
					} else {
						handlerInstance = handlerClass.newInstance();
					}
					PacketManager.getPacketManager().bind(id,
							(PacketHandler) handlerInstance);
					logger.fine("Bound " + handler.getValue() + " to opcode : "
							+ id);
				}
			}
			if (loader instanceof LoginServerWorldLoader) {
				connector = new LoginServerConnector(
						mappings.get("loginServer"));
				connector.connect(mappings.get("nodePassword"),
						Integer.parseInt(mappings.get("nodeId")));
			}
		} finally {
			fis.close();
		}
	}