Need help with printing edocs with a laserjet1320. Wont print large jobs. installed 10.7 update.Help

i am trying to print 50 page(5mb) document package on legal paper and the printer is printing one page at a time. I am using a macbook pro  10.7 and I have installed the update. however, it seems as though the computer is not correctly communicating with the printer. A four page job was no problem. I believe these printers are capable of high volume printing. Can I reinstall the firmware? Adobe acrobat will not even communicate with the printer. It just says "waiting for printer to become available." Using "preview", it sends the job to the printer, however, it is printing about 5pages per minute. It is connected through a usb cable. thanks for your help.
Randy

Randys714 welcome to the forum
Your laserjet1320 is a commercial product. I will suggest posting in the forum for HP Business Support as well for yet a better chance at finding a prompt solution.
You may find the commercial Laserjet board here.
http://h30499.www3.hp.com/t5/Printers-LaserJet/bd-p/bsc-413
Thanks;
RobertoR
You can say THANKS by clicking the KUDOS STAR. If my suggestion resolves your issue Mark as a "SOLUTION" this way others can benefit Thanks in Advance!

Similar Messages

  • HT4061 I need help with my I-phone 4S and the Cloud,  I can't locate my serial number  I also have a new 4g I-Pad  Can someone help me

    I need help to locate my pictures in the cloud
    When my son updated my phone early this year it wiped out all my pictues on my I-phone 4S
    How do I access the cloud to view my pictures??

    Do you have Photo Stream enabled with your iCloud account on your computer?
    iCloud is temporary storage - limited to 1,000 photos and 30 days for each photo.
    Photos/videos in your iPhone's Camera Roll can and should be imported by your computer as with any other digital camera especially before installing an iOS update.

  • I desperately need help installing Canon Pixma ip6000D printer in Windows 7 64-bit

    My software CD (drivers, etc.) will not work with Windows 7 64-bit. I have tried running it in Windows XP compatibility mode, but it says it is made for 32-bit and will not work with 64-bit. Canon's website says it has an add-on module, but it doesn't have
    the printer driver, and it says "Your printer must be installed via Microsoft Update before you download and use this module." I have tried to find a way to install the printer via Microsoft Update, But I can't find any information
    about how to do this.
    I have also done searches for the canon pixma ip6000d drivers for windows 7 64-bit, but all the results I have seen say that they are an add-on modules.
    I would GREATLY appreciate any help with this.

    After doing some more digging, I found a solution, and hopefully it will help anyone else who is having problems. Go to this page:
    http://windows.microsoft.com/en-US/windows7/Install-a-printer
    You can manually install the printer by following these instructions. If the model of your printer does not show (mine didn't), click the update button. It will take several minutes (maybe longer if you have a slow internet connection), but eventually it
    will bring up a new list of printers. Just choose your printer and follow the instructions. My printer is working fine now.

  • Need help with duplicate print jobs over network that I can't cancel

    I have the Photosmart Premium All-in-One on my home network.  My kids who each have laptop running Windows 7 and are connected via wireless to the printer via a DLINK DIR-655.
    They hit the print button too many times and it keeps printing over and over again.
    Is there a way to get the printer to stop printing these duplicates.  I tried turning off/on but they just keep printing.
    We're wasting paper/ink and I need help with a solution.
    Please let me know.  Thanks.
    Angelo

    There should be a button with a red 'X' on it on the front of the printer.  This is the print cancel button.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • HP Envy 110e printer (D411a) will not install with me using Windows 8 Consumer Preview. I need help

    Just pick up the new HP Envy D411a printer, i set up with my wi-fi and all was going well until i put the disk in my PC . Just to find out that my NEW printer will not work with the Windows 8 Consumer Preview . I need help with this or until UP update the new printer to work with Windows 8, which will be on the market soon. Can some one please HELP ME

    Available now is print and scan capability that HP worked with Microsoft to include into Windows 8.
    The Printer Install Wizard can provide you additional information:
    http://h30434.www3.hp.com/t5/Windows-8-Consumer-Preview/How-to-Get-Your-Inkjet-Printer-Working-with-...
    If I have helped you solve your issue please mark it as solved .....
    (I am an HP employee)

  • User with a paid CC acct, getting "Print.ai" is an unknown format' when trying to open new file. Computer was recently attacked by ransomeware and wonder if I need to re-install Creative cloud software....need help asap!!

    User with a paid CC acct, getting "Print.ai" is an unknown format' when trying to open new file. Computer was recently attacked by ransomeware and wonder if I need to re-install Creative cloud software....need help asap!!

    First, ask in the forum for the program you are using
    This forum is about the Cloud as a delivery process, not about using individual programs
    If you start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll
    Second, do a complete scan with a good anti-virus program to be sure your computer is clean... I use Norton, there are others

  • I need help I can connect my printer to my router to use my printers with my mini I pad

    I need help I have been trying for hours to connect my new e printer to my router ,to use with my ipad mini

    Hi,
    The simplest way to print wirelessly from your ipad is to download the HP eprint app and ensure that both your printer and device are connected to the same wifi network - once this is complete, you'll be bale to print wirelessly from within the eprint app.
    Alternatively, you can use the wireless direct funtion of your printer by turining on the wireless button on the front of the printer. This allows the printer generate it's own wifi singal that you can connect to through any wireless device. To find the wireless password, simply hold down the wireless direct button for more than 3 secs and it will print the password on plain paper (make sure paper is loaded).
    "Although I work for HP, I'm speaking for myself and not on behalf of HP"
    "Say "Thanks" by clicking the Kudos Star in the post that helped you.
    --Please mark the post that solves your problem as "Accepted Solution"

  • I need help with printing labels.  please

    I need help with printing labels.  thanks in advance

    Welcome to Apple Support Communities.
    In Address Book, first select a name or group of names to print.
    Then File, Print, select Style, Mailing Labels, then Layout to select a specific target label (such as an Avery number), or define your own...

  • I would need help with the following please: I need to save some of my email on a disk. I was going to Print, then Save PDF but then I am stuck. Help please. Thanks. Elisabeth

    I would need help with saving some eamil messages to a disk to unclutter my email. How can I do this please?
    Thanks.
    Elisabeth

    Open the email and then from the File menu select Save As Rich Text Format. That'll save it to open in TextEdit. If you want a pdf then open the email and do command-p (Print) and then from the PDF drop down box lower left corner select Save as PDF.

  • HT4199 I need help with getting my printer to print, PLEASE.

    I need help with getting my printer to print, Please.

    What have you done so far?
    I suggest you connect it via a usb  cable first.  Once you get the printer working, move to wifi.  You will have to use an existing printer usb cable or purchase a cable.  Be sure to get the correct cable.  Ask for help.
    The warrenty indicates there is phone support.  Give HP a call.
    Warranty
    One-year limited hardware warranty; 24-hour, 7 days a week phone support
    Robert

  • I need help printing with HP laserjet 2200 and OS 10.6

    I need help setting up my HP laserjet 2200 and OS 10.6 -- I've downloaded and installed all the software and still can't print.

    Hey jeo1951,
    If you haven't already, try running through the recommended steps in the following article:
    Mac 101: Printing (Mac OS X v10.6)
    http://support.apple.com/kb/HT3771
    It should help you set up your printer.
    Welcome to Apple Support Communities!
    All the best,
    Delgadoh

  • Need help with a printer connected to a windows home server

    I have a Windows Home Server that has a Brother laser printer connected to it via a USB cable. The printer driver is installed on the WHS and on each PC. My PCs on the network find the printer and can print to it with no problems. But, with my MBA, I'm having issues. I can see the printer as part of the server when installing/setting it up on the MBA and found the Ma printer driver from Brother and installed it on MBA. However, print jobs I send it never print out. What did I do wrong?

    Your MBA should be able to detect the printer and locate the driver, install it and mount the printer. I have an HP5180 color all in one, which I have connected to my Windows PC, and my MBA sees it and prints to it just fine. Have you looked to see if Brother has a Mac driver for it?

  • Attachment Print along with xml output - Need help !!!

    Hi,
    I have a existing report which prints a Job details. The parameters are
    1. Job From
    2. Job To etc..
    So if the program runs, it creates and prints the output
    For Job No 1
    Job No 1 ... details
    For Job No 2
    Job No 1 ... details
    Now the requirement is to print the attachment associated to the job (present in FND_LOBS.FILE_DATA) just after the specific job finishes.
    Required output
    For Job No 1
    Job No 1 ... details
    Job No 1 Attachment (can be in pdf/excel/image etc) -- Not sure if I can do this by calling sub-template.
    For Job No 2
    Job No 2 ... details
    Job No 2 Attachment (can be in pdf/excel/image etc)
    Any Clues !!!!!!!!
    Thanks,
    Neil

    Hi Neil,
    I have also got the same requirement to print the content of the attachment after printing the job details.
    If you have got soultion for this, it would be great if you could share the solution since the requirement is very urgent.
    Thanks a Lot.
    Gowri.

  • Need help to create report with jpeg/gif image

    Hello,
    I need help with creating a form with a special jpeg/gif seal. I never done this Java. Until now, I created all forms with ansi C++ with HP escape characters to draw lines, boxs, and text. This form will contain boxes which is populated with database information read from a text file.
    Since this form contains a special seal on the upper right, I don't think it can be done with old fashion ansi C++. How can I create a form with Java and create it as a simple exe to just print the form to a specified printer.
    Thanks,
    John

    Hi,
    I am creating a form with boxes (lines and text). What is special about this form is that it has an image jpeg or gif at the top right corner. Is is a state department seal. Up to this form, I had used ansi C++ and print out escape HP character to print out the lines, boxes, and text. I have no idea how to print out the image. I am new to JAVA and only 1 class in it. Is there sample code out there to create this type of form with the image? I need a starting point.
    Thanks,
    John

  • Need help with an assignment

    first of all, who has heard of the game called zuul? It is a very boring text based game I am currently having the pleasure of improving.
    Basically, you are in a room, that is connected to a bunch of other rooms and depending on the room you are in, you have different exists and different items in the room.
    The goal is to navigate through the collection of Rooms and there is no real win condition, It is more for learning then for actually playing.
    You navigate by a series of commands such as: go (direction)( as in "direction of exit", NSEW), quit, a few other odd bits.
    ex: go south, quit, go west etc
    The game has several classes: Game, Command, CommandWords, Item, Parser, Room.
    Obviously Game is the main central head conch, (it is not the super class.)
    Game makes use of Item, Room, Parser, and Command.
    Item is the class that deals with the number of items in the Room.
    Room is the class that deals with the rooms the player will navigate to and from.
    Command reads in the commands such as "go-(direction)" or "quit".
    Parser makes everybody understand each other by using both Command and CommandWords.
    CommandWords is a list of commands such as "go", "quit" etc.
    The problem I am having right now is to allow a player to move through the rooms while holding a certain item. The item has to come from the rooms and the player should be able to drop it.
    So I have to add two new commands: take and drop. The problem is that I have been asked to do this without creating a new class. Otherwise I would have just created class Player and be done with it. So I am trying to figure out whose responsibility should it be to take care of the take and drop command. I have done some preliminary work in class Game, it is the take(Command command) and drop() methods.
    I have also a few questions concerning other aspects of the project, I have listed their locations here:
    1. The take() method in class Game, the for-each loop, a complier error with ArrayList
    2. class Parser, a general question about the string tokenzier
    If you want to see how the game is suppose to run, just comment out the bodies of take() and drop(). Not the declaration. Everything else works.
    I shall now provide the code to all classes. I wish there were an option to upload a zip file, then you don't have to read through all the codes and copy&paste all the codes. The complier I am using is BlueJ. And the SDK version is 1.6. With the exception of class Game, everything else can be assumed to be error free.
    Thank you for your time,
    Davy
    class Game
    import java.util.*;
    *  This class is the main class of the "World of Zuul" application.
    *  "World of Zuul" is a very simple, text based adventure game.  Users
    *  can walk around some scenery. That's all. It should really be extended
    *  to make it more interesting!
    *  To play this game, create an instance of this class and call the "play"
    *  method.
    *  This main class creates and initialises all the others: it creates all
    *  rooms, creates the parser and starts the game.  It also evaluates and
    *  executes the commands that the parser returns.
    * @author  Michael Kolling and David J. Barnes
    * @version 2006.03.30
    public class Game
        private Parser parser;
        private Room currentRoom;
        private Room previousRoom;
        private Stack<Room> previousRooms;
         * Create the game and initialise its internal map.
        public Game()
            createRooms();
            parser = new Parser();
         * Create all the rooms and link their exits together.
        private void createRooms()
            Room outside, theatre, pub, lab, office;
            // create the rooms
            outside = new Room("outside the main entrance of the university");
            theatre = new Room("in a lecture theatre");
            pub = new Room("in the campus pub");
            lab = new Room("in a computing lab");
            office = new Room("in the computing admin office");
            // create some items
            Item desk, chair, beer, podium, tree;
            desk = new Item("desk", "student desk",10);
            chair = new Item("chair", "student chair",5);
            beer = new Item("beer", "glass of beer", 0.5);
            podium = new Item("podium", "lecture podium", 100);
            tree = new Item("tree", "a tree", 500.5);
            // put items in some of the rooms
            outside.addItem(tree);
            theatre.addItem(desk);
            theatre.addItem(chair);
            theatre.addItem(podium);
            pub.addItem(beer);
            pub.addItem(beer);
            office.addItem(desk);
            lab.addItem(chair);
            lab.addItem(beer);
            // initialise room exits
            outside.setExit("east", theatre);
            outside.setExit("south", lab);
            outside.setExit("west", pub);
            theatre.setExit("west", outside);
            pub.setExit("east", outside);
            lab.setExit("north", outside);
            lab.setExit("east", office);
            office.setExit("west", lab);
            currentRoom = outside;  // start game outside
            previousRooms = new Stack<Room>(); // no rooms on the stack
            previousRoom = null;
         *  Main play routine.  Loops until end of play.
        public void play()
            printWelcome();
            // Enter the main command loop.  Here we repeatedly read commands and
            // execute them until the game is over.
            boolean finished = false;
            while (! finished) {
                Command command = parser.getCommand();
                finished = processCommand(command);
            System.out.println("Thank you for playing.  Good bye.");
         * Print out the opening message for the player.
        private void printWelcome()
            System.out.println();
            System.out.println("Welcome to the World of Zuul!");
            System.out.println("World of Zuul is a new, incredibly boring adventure game.");
            System.out.println("Type 'help' if you need help.");
            System.out.println();
            System.out.println(currentRoom.getLongDescription());
         * Given a command, process (that is: execute) the command.
         * @param command The command to be processed.
         * @return true If the command ends the game, false otherwise.
        private boolean processCommand(Command command)
            boolean wantToQuit = false;
            if(command.isUnknown()) {
                System.out.println("I don't know what you mean...");
                return false;
            String commandWord = command.getCommandWord();
            if (commandWord.equals("help")) {
                printHelp();
            else if (commandWord.equals("go")) {
                goRoom(command);
            else if (commandWord.equals("look")) {
                look(command);
            else if (commandWord.equals("eat")) {
                eat(command);
            else if (commandWord.equals("back")) {
                back(command);
            else if (commandWord.equals("stackBack")) {
                stackBack(command);
            else if (commandWord.equals("take")){
                take(command);
            else if (commandWord.equals("drop")) {
                drop(command);
            else if (commandWord.equals("quit")) {
                wantToQuit = quit(command);
            // else command not recognised.
            return wantToQuit;
        // implementations of user commands:
         * Print out some help information.
         * Here we print some stupid, cryptic message and a list of the
         * command words.
        private void printHelp()
            System.out.println("You are lost. You are alone. You wander");
            System.out.println("around at the university.");
            System.out.println();
            System.out.println("Your command words are:");
            System.out.println(parser.getCommands());
         * Try to go to one direction. If there is an exit, enter the new
         * room, otherwise print an error message.
         * @param command The command entered.
        private void goRoom(Command command)
            if(!command.hasSecondWord()) {
                // if there is no second word, we don't know where to go...
                System.out.println("Go where?");
                return;
            String direction = command.getSecondWord();
            // Try to leave current room.
            Room nextRoom = currentRoom.getExit(direction);
            if (nextRoom == null) {
                System.out.println("There is no door!");
            else {
                previousRooms.push(currentRoom);
                previousRoom = currentRoom;
                currentRoom = nextRoom;
                System.out.println(currentRoom.getLongDescription());
         * "Look" was entered.
         * @param command The command entered.
        private void look(Command command)
            if(command.hasSecondWord()) {
                System.out.println("Look what?");
                return;
            System.out.println(currentRoom.getLongDescription());
         * "Eat" was entered.
         * @param command The command entered.
        private void eat(Command command)
            if(command.hasSecondWord()) {
                System.out.println("Eat what?");
                return;
            System.out.println("You have eaten and are no longer hungry!");
         * "Back" was entered.
         * @param command The command entered.
        private void back(Command command)
            if(command.hasSecondWord()) {
                System.out.println("Back what?");
                return;
            if (previousRoom==null) {
                System.out.println("Can't go back.");
                return;
            // push current room on stack (for stackBack)
            previousRooms.push(currentRoom);
            // swap current and previous rooms (for back)
            Room temp = currentRoom;
            currentRoom = previousRoom;
            previousRoom = temp;
            // You could replace the previous three lines with the following
            // which use the stack to get the previous room
            // but note that this makes "back" dependent on "stackBack".
            // (If you do it this way you no longer need "temp".
            // currentRoom = previousRoom;
            // previousRoom = previousRooms.peek();
            System.out.println("You have gone back:");
            System.out.println(currentRoom.getLongDescription());
         * "StackBack" was entered.
         * @param command The command entered.
        private void stackBack(Command command)
            if(command.hasSecondWord()) {
                System.out.println("StackBack what?");
                return;
            if (previousRooms.isEmpty()) {
                System.out.println("Can't go StackBack.");
                return;
            // set previous room (for "back")
            previousRoom = currentRoom;
            // set new current room (using stack)
            currentRoom = previousRooms.pop();
            System.out.println("You have gone StackBack:");
            System.out.println(currentRoom.getLongDescription());
         * allows a player to take something from the room
         * @param command
        private void take(Command command){
        String a;
        a=command.getSecondWord();
        for (Item i:currentRoom.items()) { //a for each loop, since the room's items are kept in a list, but this gives a                                           //compiler error, it doesn't work because items is an ArrayList, but I need a way to pick up the item. I thought that if //given the item's name, I could run a check through the room's ArrayList of items via a for-each loop
            if (a==i.getName()) {
            removeItem (i);
            return;
         * allows a player to drop an item in the room
         * @param command
        private void drop(Command command) {
            if(command.hasSecondWord()) {
                System.out.println("drop what?");
                return;
            //add item method is suppose to be used here
         * "Quit" was entered. Check the rest of the command to see
         * whether we really quit the game.
         * @param command The command entered.
         * @return true, if this command quits the game, false otherwise.
        private boolean quit(Command command)
            if(command.hasSecondWord()) {
                System.out.println("Quit what?");
                return false;
            else {
                return true;  // signal that we want to quit
    }class Room
    import java.util.*;
    * Class Room - a room in an adventure game.
    * This class is part of the "World of Zuul" application.
    * "World of Zuul" is a very simple, text based adventure game. 
    * A "Room" represents one location in the scenery of the game.  It is
    * connected to other rooms via exits.  For each existing exit, the room
    * stores a reference to the neighboring room.
    * @author  Michael Kolling and David J. Barnes
    * @version 2006.03.30
    * @author L.S. Marshall
    * @version 1.03 October 25, 2007
    public class Room
        private String description;
        private HashMap<String, Room> exits;        // stores exits of this room.
        // The items in the room
        private ArrayList<Item> items;
         * Create a room described "description". Initially, it has
         * no exits. "description" is something like "a kitchen" or
         * "an open court yard".
         * @param description The room's description.
        public Room(String description)
            this.description = description;
            exits = new HashMap<String, Room>();
            items = new ArrayList<Item>();
         * Define an exit from this room.
         * @param direction The direction of the exit.
         * @param neighbor  The room to which the exit leads.
        public void setExit(String direction, Room neighbor)
            exits.put(direction, neighbor);
         * Gives a short description of the room.
         * @return The short description of the room
         * (the one that was defined in the constructor).
        public String getShortDescription()
            return description;
         * Return a description of the items in the room
         * (Note that this could be combined with getLongDescription, but
         * this way shows better cohesion, and could avoid code duplication
         * for future enhancements.)
         * @return A description of the items in this room
        public String getItemsDescription()
            String s = new String();
            if (items.size()==0)
                s += "There are no items in this room.\n";
            else {
                s += "The item(s) in the room are:\n";
                for (Item item : items ) {
                   s += item.getInfo() + "\n";
            return s;
         * Return a description of the room in the form:
         *     You are in the kitchen.
         *     Exits: north west
         *     and information on the items in the room
         * @return A long description of this room
        public String getLongDescription()
            String s = "You are " + description + ".\n" + getExitString() + "\n";
            s += getItemsDescription();
            return s;
         * Return a string describing the room's exits, for example
         * "Exits: north west".
         * @return Details of the room's exits.
        private String getExitString()
            String returnString = "Exits:";
            Set<String> keys = exits.keySet();
            for(String exit : keys) {
                returnString += " " + exit;
            return returnString;
         * Return the room that is reached if we go from this room in direction
         * "direction". If there is no room in that direction, return null.
         * @param direction The exit's direction.
         * @return The room in the given direction.
        public Room getExit(String direction)
            return exits.get(direction);
         * Adds the given item to the room.
         * @param item The item to be added
        public void addItem(Item item)
            items.add(item);
         * Removes an item if the person picks it up
         * @param item the item to be removed
        public void removeItem (Item item)
            items.remove(item);
    }class Item
    * This represents an item in a room in zuul.
    * @author L.S. Marshall
    * @version 1.00 October 9, 2007
    public class Item
        // The description of the item
        private String description;
        // The weight of the item
        private double weight;
        private String name;
         * Constructor for objects of class Item
         * @param desc description of the item
         * @param weight the weight of the item
        public Item(String name, String desc, double weight)
            description = desc;
            this.weight = weight;
            this.name=name;
         * Returns a string representing this item
         * @return string representing this item
        public String getInfo()
            return ("Item: " + description + ", weighs " + weight + ".");
         * returns the name of the string
         * @ return the name in a string
        public String getName()
            return ( name );
    }class Command
    * This class is part of the "World of Zuul" application.
    * "World of Zuul" is a very simple, text based adventure game. 
    * This class holds information about a command that was issued by the user.
    * A command currently consists of two strings: a command word and a second
    * word (for example, if the command was "take map", then the two strings
    * obviously are "take" and "map").
    * The way this is used is: Commands are already checked for being valid
    * command words. If the user entered an invalid command (a word that is not
    * known) then the command word is <null>.
    * If the command had only one word, then the second word is <null>.
    * @author  Michael Kolling and David J. Barnes
    * @version 2006.03.30
    public class Command
        private String commandWord;
        private String secondWord;
         * Create a command object. First and second word must be supplied, but
         * either one (or both) can be null.
         * @param firstWord The first word of the command. Null if the command
         *                  was not recognised.
         * @param secondWord The second word of the command.
        public Command(String firstWord, String secondWord)
            commandWord = firstWord;
            this.secondWord = secondWord;
         * Return the command word (the first word) of this command. If the
         * command was not understood, the result is null.
         * @return The command word.
        public String getCommandWord()
            return commandWord;
         * @return The second word of this command. Returns null if there was no
         * second word.
        public String getSecondWord()
            return secondWord;
         * @return true if this command was not understood.
        public boolean isUnknown()
            return (commandWord == null);
         * @return true if the command has a second word.
        public boolean hasSecondWord()
            return (secondWord != null);
    }class Parser
    import java.util.Scanner;
    import java.util.StringTokenizer;
    //I read the documentation for String Tokenizer, and I have a few questions relating to a pet project of mine. The //project is to build a boolean algebra simplifer. I would give it a boolean expression and it will simplify it for me.
    //Which is very similar to what this class does. The documentation mentioned a delimiter for separating the tokens.
    //yet I see none here, is the delimiter at default, the space between the words? and if I were to set manually //delimiters, how do I do that?
    //Once I read in the string, should it be Parser's job to execute the boolean simplification part? According the RDD,
    //it shouldn't, but doing so would keep everything in fewer classes and therefore easier to manage, wouldn't it?
    * This class is part of the "World of Zuul" application.
    * "World of Zuul" is a very simple, text based adventure game. 
    * This parser reads user input and tries to interpret it as an "Adventure"
    * command. Every time it is called it reads a line from the terminal and
    * tries to interpret the line as a two word command. It returns the command
    * as an object of class Command.
    * The parser has a set of known command words. It checks user input against
    * the known commands, and if the input is not one of the known commands, it
    * returns a command object that is marked as an unknown command.
    * @author  Michael Kolling and David J. Barnes
    * @version 2006.03.30
    * @author L.S. Marshall
    * @version 1.01 October 9, 2007
    public class Parser
        private CommandWords commands;  // holds all valid command words
        private Scanner reader;         // source of command input
         * Create a parser to read from the terminal window.
        public Parser()
            commands = new CommandWords();
            reader = new Scanner(System.in);
         * Command returns the command typed by the user.
         * @return The next command from the user.
        public Command getCommand()
            String inputLine;   // will hold the full input line
            String word1 = null;
            String word2 = null;
            System.out.print("> ");     // print prompt
            inputLine = reader.nextLine();
            // Find up to two words on the line.
            Scanner tokenizer = new Scanner(inputLine);
            if(tokenizer.hasNext()) {
                word1 = tokenizer.next();      // get first word
                if(tokenizer.hasNext()) {
                    word2 = tokenizer.next();      // get second word
                    // note: we just ignore the rest of the input line.
            // Now check whether this word is known. If so, create a command
            // with it. If not, create a "null" command (for unknown command).
            if(commands.isCommand(word1)) {
                return new Command(word1, word2);
            else {
                return new Command(null, word2);
         * Returns a list of valid command words.
         * @string list of valid command words
        public String getCommands()
            return commands.getCommandList();
    }class CommandWords
    * This class is part of the "World of Zuul" application.
    * "World of Zuul" is a very simple, text based adventure game.
    * This class holds an enumeration of all command words known to the game.
    * It is used to recognise commands as they are typed in.
    * @author  Michael Kolling and David J. Barnes
    * @version 2006.03.30
    * @author L.S. Marshall
    * @version 1.01 October 9, 2007
    public class CommandWords
        // a constant array that holds all valid command words
        private static final String[] validCommands = {
            "go", "quit", "help", "look", "eat", "back", "stackBack",
            "take", "drop",
         * Constructor - initialise the command words.
        public CommandWords()
            // nothing to do at the moment...
         * Check whether a given String is a valid command word.
         * @param aString the command word
         * @return true if it is, false if it isn't.
        public boolean isCommand(String aString)
            for(int i = 0; i < validCommands.length; i++) {
                if(validCommands.equals(aString))
    return true;
    // if we get here, the string was not found in the commands
    return false;
    * Return a string containing all valid commands.
    * @return string of all valid commands
    public String getCommandList()
    String s="";
    for(String command: validCommands) {
    s += command + " ";
    return s;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    right, sorry, that was thoughtless of me.
    class Parser
    import java.util.Scanner;
    import java.util.StringTokenizer;
    //I read the documentation for String Tokenizer, and I have a few questions relating to a pet project of mine. The //project is to build a boolean algebra simplifer. I would give it a boolean expression and it will simplify it for me.
    //Which is very similar to what this class does. The documentation mentioned a delimiter for separating the tokens.
    //yet I see none here, is the delimiter at default, the space between the words? and if I were to set manually //delimiters, how do I do that?
    //Once I read in the string, should it be Parser's job to execute the boolean simplification part? According the RDD,
    //it shouldn't, but doing so would keep everything in fewer classes and therefore easier to manage, wouldn't it?
    * This class is part of the "World of Zuul" application.
    * "World of Zuul" is a very simple, text based adventure game. 
    * This parser reads user input and tries to interpret it as an "Adventure"
    * command. Every time it is called it reads a line from the terminal and
    * tries to interpret the line as a two word command. It returns the command
    * as an object of class Command.
    * The parser has a set of known command words. It checks user input against
    * the known commands, and if the input is not one of the known commands, it
    * returns a command object that is marked as an unknown command.
    * @author  Michael Kolling and David J. Barnes
    * @version 2006.03.30
    * @author L.S. Marshall
    * @version 1.01 October 9, 2007
    public class Parser
        private CommandWords commands;  // holds all valid command words
        private Scanner reader;         // source of command input
         * Create a parser to read from the terminal window.
        public Parser()
            commands = new CommandWords();
            reader = new Scanner(System.in);
         * Command returns the command typed by the user.
         * @return The next command from the user.
        public Command getCommand()
            String inputLine;   // will hold the full input line
            String word1 = null;
            String word2 = null;
            System.out.print("> ");     // print prompt
            inputLine = reader.nextLine();
            // Find up to two words on the line.
            Scanner tokenizer = new Scanner(inputLine);
            if(tokenizer.hasNext()) {
                word1 = tokenizer.next();      // get first word
                if(tokenizer.hasNext()) {
                    word2 = tokenizer.next();      // get second word
                    // note: we just ignore the rest of the input line.
            // Now check whether this word is known. If so, create a command
            // with it. If not, create a "null" command (for unknown command).
            if(commands.isCommand(word1)) {
                return new Command(word1, word2);
            else {
                return new Command(null, word2);
         * Returns a list of valid command words.
         * @string list of valid command words
        public String getCommands()
            return commands.getCommandList();
    }

Maybe you are looking for

  • MacBook Pro - USB Hub power exceeded / Lost TrackPad / iSight

    Hello I have an older 17 inch MacBook Pro - Windows XP Generic USB HUB , 1 of three is not working Marked with a yellow exclamation mark in Hardware explorer in Windows Tried dropping the driver etc When I insert just a USB memory stick - says USB po

  • Illustrating Use of Large OBjects (LOBs) ERROR

    I download the sample JAR file and follow the instruction in: http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/LOBSample/Readme.html I am using Windows 2000 and unjar the files to C:\LOBSample I login SQL Plus login as SYS and cre

  • MII BLS Trasaction calling SAP RFC call - How to pass XML document as input parameter

    Hi, 1. I am very new to the SAP and SAP xMII workbench. I have a webpage with iGrid applet embedded on it. We have multiple rows in the iGrid applet that can be selected by user. After selecting single or multiple grid rows user clicking a 'button' o

  • Plug in AC or remove AC?

    hi my friends. I buy a macbook pro 13 inch. I have one important question. I don't know for ideal battery use when use macbook pro and battery is 100% keep plug in to AC or use battery and remove ac adapter.

  • Perf. implications of high frame rate

    What are the performance implications of using a high frame rate in Flex. Our designers suggest that a frame rate of 60fps is smoother animation. They are creating Flex components with Flash CS3 and want to use the higher rate and use them in Flex.