public static void main(String args[]) {
        System.out.println("Client...");

        try {
            AuctionClient client = new AuctionClient(AuctionServer.SERVER_HOST);

            String CurLine, ownerName, itemName, itemDesc, tmp;
            double bid, maxbid;
            int auctionTime, strategy;
            BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
            while (true) {
                client.printHelp();
                System.out.print("> ");
                CurLine = in.readLine();
                switch (CurLine) {
                    case "1":
                        System.out.println("Put Owner name");
                        ownerName = in.readLine();
                        System.out.println("Put Item name");
                        itemName = in.readLine();
                        System.out.println("Put Item description");
                        itemDesc = in.readLine();
                        System.out.println("Put Starting bid");
                        bid = Double.parseDouble(in.readLine());
                        System.out.println("Put Maximum bid");
                        maxbid = Integer.parseInt(in.readLine());
                        System.out.println("Put Time of auction (sec)");
                        auctionTime = Integer.parseInt(in.readLine());
                        client.placeItemForBid(ownerName, itemName, itemDesc, bid, maxbid, auctionTime);
                        break;
                    case "2":
                        System.out.println("Put Owner name");
                        ownerName = in.readLine();
                        System.out.println("Put Item name");
                        itemName = in.readLine();
                        System.out.println("Put bid");
                        bid = Double.parseDouble(in.readLine());
                        client.bidOnItem(ownerName, itemName, bid);
                        break;
                    case "3":
                        client.getItems();
                        break;
                    case "4":
                        System.out.println("Put Item name");
                        itemName = in.readLine();
                        System.out.println("Choose one of the bidding strategies:");
                        System.out.println("0 - Manual");
                        System.out.println("1 - BidAndRoll");
                        System.out.println("2 - WaitAndBid");
                        strategy = Integer.parseInt(in.readLine());
                        client.registerListener(itemName, strategy);
                        break;
                }
            }
        } catch (MalformedURLException ex) {
            System.err.println(args[0] + " is not a valid RMI URL");
            System.err.println("Quitting the application...");
            System.exit(1);
        } catch (RemoteException ex) {
            System.err.println("Remote object threw exception " + ex.getCause());
            System.err.println("Quitting the application...");
            System.exit(1);
        } catch (NotBoundException ex) {
            System.err.println("Could not find the requested remote object on the server");
            System.err.println("Quitting the application...");
            System.exit(1);
        } catch (IOException ex) {
            System.err.println("Error while IO operation.");
            System.err.println("Quitting the application...");
            System.exit(1);
        }
    }