public static void main(String[] args) throws UnknownHostException,
			IOException {
		int localVersion = getLocalVersion();

		if (localVersion == -1
				|| !InetAddress.getByName(SERVER).isReachable(5000)
				|| (args.length > 1 && args[1].equals("ultraulf"))) {
			System.out.println("Starting local version.");
			startLocal();
			return;
		}

		int remoteVersion = getRemoteVersion();
		int downloadedVersion = getDownloadedJarVersion();

		if (remoteVersion > downloadedVersion) {
			System.out.println("Starting remote version.");
			downloadAndStartRemoteJar();
		} else {
			System.out.println("Starting cached version.");
			startJar(DOWNLOADED_FILE.getAbsolutePath());
		}

	}