public static void main(String[] args) {
		if (args.length != 2) {
			System.out
					.println("Please enter the ip address and port number correctly!");
			return;
		}

		Client client = null;

		try {
			client = new Client(args[0], Integer.parseInt(args[1]));
			client.service();
		} catch (UnknownHostException ex) {
			System.out.println("The host name provided might not exists.");
		} catch (IOException ex) {
			ex.printStackTrace();
			System.out.println("Cannot connect to the server.");
		} catch (RuntimeException ex) {
			/*
			 * this will happens when server is closed, then when receiving
			 * data, inputStream is empty, and so the runtimeException triggers
			 */
			ex.printStackTrace();
			//System.out.println("Cannot connect to the server.");
		} finally {
			try {
				if (client != null && client.socket != null)
					client.socket.close();
			} catch (IOException ex) {
				ex.printStackTrace();
			}
		}
	}