private Global() {

		try {
			icon = ImageIO.read(getClass().getClassLoader()
					.getResourceAsStream("icon.png"));

			if (System.getProperty("os.name").toLowerCase().contains("win"))
				configFile = new File(System.getenv("APPDATA") + File.separator
						+ "JNapi" + File.separator + "config.dat");
			else
				configFile = new File(System.getProperty("user.home")
						+ File.separator + ".JNapi" + File.separator
						+ "config.dat");

			configFile.getParentFile().mkdirs();

			if (configFile.exists()) {
				BufferedReader input = new BufferedReader(new FileReader(
						configFile));

				String line;
				while ((line = input.readLine()) != null) {
					if (line.matches("LANG:\\t\\t.+;"))
						lang = Lang.getValueOf(line.substring(7,
								line.lastIndexOf(";")));
					if (line.matches("FORMAT:\\t\\t.+;"))
						format = Format.valueOf(line.substring(9,
								line.lastIndexOf(";")));
					if (line.matches("CHARSET:\\t.+;"))
						subtitlesCharset = SubtitlesCharset.getValueOf(line
								.substring(9, line.lastIndexOf(";")));
					if (line.matches("LAST_DIR:\\t.+;")) {
						File tmp = new File(line.substring(10,
								line.lastIndexOf(";")));
						if (tmp.exists())
							lastUsedDirectory = tmp;
					}
				}

				input.close();
			} else {
				FileWriter output = new FileWriter(configFile);
				output.write("LANG:\t\tNULL;\nFORMAT:\t\tNULL;\nCHARSET:\tNULL;\nLAST_DIR:\tNULL;");
				output.close();

				setLang(Lang.PL);
				setFormat(Format.MicroDVD);
				setSubtitlesCharset(SubtitlesCharset.Windows);
				setLastUsedDirectory(new File(System.getProperty("user.home")));
			}

		} catch (IOException e) {
			logger.warning(e.toString());
			e.printStackTrace();
		}
	}