CS1 for Java (Keyboard Input)

I downloaded CS1 for my Comp. Sci class in order to use Keyboard input in my Java coding. However, I don't know where to put the downloaded .jar file. Could somebody please help me? This is where I downloaded it from: http://duke.csc.villanova.edu/jss1/bookResources/keyboard.jsp
Thanks

Hi Max
It's not your fault but I am appalled that Java teachers are still using bodges like the Keyboard class, when the standard Scanner class has been available for over 12 months.
So here's what I suggest:
1) Try putting the jar file into /Library/Java/Extensions
2) Tell your tutor to get his notes up to date and use the Scanner class instead of Keyboard
Bob

Similar Messages

  • Alternative ASCII characters for standard keyboard input using TextEdit?

    Hi, how can slight variations to characters be made on the fly while typing in TextEdit? For example, using Option + O I'm able to type "Ø"...how can I type other "variations" of O...with accents, umlauts, etc? thanks

    Choose Show Keyboard Viewer from the menu with the flag icon. If it doesn't appear, open the International pane of System Preferences to enable it and the input menu.
    (48307)

  • Validating keyboard input data

    I am new to java and have a question regarding validating input.
    I did check the FAQ for "Validating keyboard input data" but found no help.
    I have to check that the keyboard input is only one of the following char a c,C,d,D
    Ihave tried different conditional loops and statements but cannot get it right.
    Could someone point me in the right direction.
    I am using the latest java.
    Thanx

    well i think i am close but i can't figure out why i have an endless loop or how to fix it
    System.out.print("Please enter the Costumer Type C or R: ");
    String cosTypeTemp = scan.nextLine();
    cosType = cosTypeTemp.charAt(0);
    while (cosType != 'c' || cosType != 'C' || cosType != 'd' || cosType != 'D');
    do
    costumerType = 'N';
    System.out.print("Wrong input please enter the Costumer Type c or r: ");
    cosTypeTemp = scan.nextLine();
    cosType = cosTypeTemp.charAt(0);
    while (cosType != 'c' || cosType != 'C' || cosType != 'd' || cosType != 'D');
    costumerType = cosType;
    System.out.print("Please enter the Number of basic service connections: ");
    System.out.print("Please enter the Costumer Type C or R: ");
    String cosTypeTemp = scan.nextLine();
    cosType = cosTypeTemp.charAt(0);
    while (cosType != 'c' || cosType != 'C' || cosType != 'd' || cosType != 'D');
    do
    costumerType = 'N';
    System.out.print("Wrong input please enter the Costumer Type c or r: ");
    cosTypeTemp = scan.nextLine();
    cosType = cosTypeTemp.charAt(0);
    while (cosType != 'c' || cosType != 'C' || cosType != 'd' || cosType != 'D');
    costumerType = cosType;
    System.out.print("Please enter the Number of basic service connections: ");
    numBsSrvConecs = scan.nextInt();
    when i enter the correct data ( c, C, d, D) it goes into infinite loop and never reaches the next keyboard scan for System.out.print("Please enter the Costumer Type C or R: ");

  • Keyboard input flag changed after 10.7.4

    Hello,
    After updating from 10.7.3 to 10.7.4, the flag icon for the keyboard input seems to have changed. For every flag, the color seems to have changed a bit, and there is a little black border around it.
    Here's how it used to look:
    http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/TS1381/TS1381-02_en. png
    Here's how it looks now:
    http://i46.tinypic.com/2ewzc46.png
    Is this normal?
    Thanks.

    I've noticed this, too. It seems to be intentional as I've seen several posts on various websites where people have brought this up. It must just be a stylistic choice that Apple made. Theses ones are more toned back and more modern looking.

  • Keyboard input help!?

    What is the easiest way to get keyboard input into my application?
    Thanks!

    Do you know [url http://www.google.ca/search?hl=en&q=java+keyboard+input&btnG=Google+Search&meta=]Google? It is very helpful.
    Also you should read thoroughly the [url http://java.sun.com/docs/books/tutorial/essential/index.html]Essential Java Classes Tutorial, more specifically (related to the question): [url http://java.sun.com/docs/books/tutorial/essential/system/iostreams.html]The Standard I/O Streams Tutorial.

  • Keyboard input broken on Centos 5.2

    I am developing a Flex application on Windows and everything
    is working fine so far.
    I deployed this application on Centos 5.2 (Linux) . Most of
    it seems to be working fine EXCEPT for the keyboard input part.
    TextInput fields would take input from numeric-keypad and few of
    the special keys but NOTHING from the alphabet-part of the
    keyboard.
    Any suggestions please?

    I find something that is for version 904, maybe could help you
    Grettings.
    Cause
    The error "[gsdsiConnect] ORA-0" in the oidmon.log simply means that something has gone wrong when oidmon tries to connect to the database.
    Possible causes include:
    a. NLS_LANG is set to a non-existant or incorrect character set e.g. NLS_LANG=american_america.NOSUCHCHARS
    b. unlock.sql is not run after RepCA is run.
    c. port 1521 is not used for the listener.
    See also Note 260915.1
    Fix
    a. Set NLS_LANG to a valid character set before starting the installer. e.g. NLS_LANG=american_america.UTF8
    b. Run unlock.sql.
    c. Use port 1521 for the MR database listener.

  • Can java program simulate keyboard input?

    is it possible to create a java program or applet that simulates an end-user's keyboard input into another java applet? is it also possible to feed the output of that target applet to a file based on the different input combinations?
    and How?
    Thanks.

    Take a look at the API-docs for the class java.awt.Robot . This generates system-level input-events. Might not work in an applet, I do not know whether an applet has the right to do this.
    The second question is actually the more difficult one, since normal applets can not do file access.

  • OSX/SL 10.6.8 all window apps lose keyboard input; mouse and cmd-N work for spaces

    Input suddenly stops going to all applications, from MacBook Pro and wireless keyboards, and from "Show Keyboard viewer" (OSX 10.6.8 'Snow Leopard', MacBook Pro). Though the OSX Keyboard Viewer shows the keys onscreen as they are pressed on the MacBook and wireless keyboards. 'Spaces' responds to cmd-N commands, but no input is possible to any running or newly-started 3rd party or Apple-provided application. Killing off applications one by one doesn't recover keyboard input ability;  a complete reboot appears necessary to restore the ability to key input into applications. This happens repeatedly, yet never registers as an OS/X 'crash' because 'Force Quit'ting applications and restarting is still possible using only the magic mouse or trackpad.   No data  whether only logging out and back in would correct the apparent input-focus disconnect of all applications with the window manager. There may be some way to restart the window manager by using the mouse to open up new apps and/or cut and paste characters ( including a carriage return ) or cut and paste entire saved typed commands into a terminal window.

    Do a backup, using either Time Machine or a cloning program, to ensure files/data can be recovered. Two backups are better than one.
    Try setting up another admin user account to see if the same problem continues. If Back-to-My Mac is selected in System Preferences, the Guest account will not work. The intent is to see if it is specific to one account or a system wide problem. This account can be deleted later.
    Isolating an issue by using another user account
    If the problem is still there, try booting into the Safe Mode using your normal account.  Disconnect all peripherals except those needed for the test. Shut down the computer and then power it back up after waiting 10 seconds. Immediately after hearing the startup chime, hold down the shift key and continue to hold it until the gray Apple icon and a progress bar appear. The boot up is significantly slower than normal. This will reset some caches, forces a directory check, and disables all startup and login items, among other things. When you reboot normally, the initial reboot may be slower than normal. If the system operates normally, there may be 3rd party applications which are causing a problem. Try deleting/disabling the third party applications after a restart by using the application un-installer. For each disable/delete, you will need to restart if you don't do them all at once.
    Safe Mode - About
    Safe Mode

  • Focus for keyboard input

    I have a VI that, when started, starts another vi that runs in a
    different part of the screen. I want the user to be able to use the
    keyboard and the original VI be the one that receives the keyboard input
    (key navigation, etc.). How do I get the focus back on the original VI
    without "clicking" on it with the mouse?
    -Stephen

    Try using Property Node under Application Control. Set the class to VI.
    Set FP.IsFrontmost to true. Wire the name of the original vi to the Open VI
    Reference function and then wire the output vi reference to the property
    node. This should return keyboard control to the original vi. If you want
    a specific control within the vi to have focus initially, right click on the
    control and create a property node. Select KeyFocus for the property,
    select Change All To Write, and wire true to the property.
    "Stephen" wrote in message
    news:[email protected]..
    > I have a VI that, when started, starts another vi that runs in a
    > different part of the screen. I want the user to be able to use the
    > keyboard and the original VI be the one that receives the key
    board input
    > (key navigation, etc.). How do I get the focus back on the original VI
    > without "clicking" on it with the mouse?
    >
    > -Stephen

  • Keyboard input for a nubie!!!!

    Can anyone help me with writng a method that accepts all keyboard input and writes it to a file? I.e. whenever a key is pressed (only letters and numbers), it is accepted even if no programs are running and no text editor is being used.
    This will help me great deal and I would be very appreciative for any help I might receive.
    Thanking any response
    ChaosSupreme

    Is this like making a key logger? It takes down all your input and saves it to a file? If it is I'm sure there are plenty of tutorials on how to make a key logger out there.
    I guess you would have to look up buffered writer and rile writer methods, although I think they are just through a text editor or program.
    Andy

  • Keyboard input for plugins

    Hi,
    Is there some way I can assign keyboard input exclusively to plugin windows when they're in focus. Currently, when I type numbers or use the cursors, Logic is responding behind the plugin window and the plugins do not get the key press notifications. This means I can only use the mouse to enter input - that makes entering a License Key VERY DIFFICULT if it includes numbers!
    Thanks in advance for your help,
    Alex

    Just to clarify... I'm talking about my laptop keyboard, not a musical keyboard.
    I'm kind of bummed that nobody has replied yet... can I be the only person who is having this problem?!?
    I've tried this with native plugins too and get the same problem. The Logic Express 8 manual states that you can alter the value in a plugin by clicking on the numeric display and typing in on the keyboard. I tried that but when I try to type, the numbers activate their associated 'screensets'. I've even unmapped the number keys from the screensets and am able to use the numbers now, but there are other keys that do undesirable things in Logic that I don't want to have to 'unmap'. Also, I want to be able to use the cursor keys 'up' 'down' etc to choose options in plugins - but they change channels etc in Logic instead of being picked up in the plugin.
    I can't be the only person with this problem can I? Please if you're reading this can you give it a try and post back here describing your experiences.
    THANKS!
    Alex

  • Keyboard input failure in 2nd java applet

    The (London) Times offers crosswords developed as Java applets. With Mandriva 2007 newly installed on my laptop (Firefox 1.5.0.8, JRE1.5.0_08), I completed one crossword and loaded a second: no keyboard input to cells, no focus shown on cells. Killed the applet, reloaded: same problem. Quit Firefox, restarted crossword: same problem. Quit session, restarted, reloaded Firefox and crossword: same problem.
    Upgraded to Firefox 2.0 and JRE1.5.0_09. Started a crossword with a couple of entries, quit and started a second: same problem - no focus on cell, no input.
    I think this is connected in some way with Mandriva 2007, because the combination Mandriva 2006 with Firefox 1.5.0.7 and JRE 1.4.2-09 works correctly.
    I believe the problem lies initially with Java, because keyboard input to non-Java pages in Firefox worked without problems.

    I have exactly the same problem with opera 9.02 browser, jre1.6, linux debian sarge and the crossword puzzle of "Le Monde" http://www.lemonde.fr/web/article/0,1-0@2-3280,36-139043,0.html
    It worked with jre 1.4 linux FC2, same opera.

  • Input for Java in the BEx Web Template Installer

    Hello,
    When you run the BEx Web Template Installer by choosing the "Complete BI PostInstallation" template and clicking Execute Template, you receive two input areas, one for ABAP and one for JAVA.  Do the input values for the JAVA section apply to the BI system or the Portal system?
    Thank you,
    Janice

    Hello,
    Yes, these seetings apply to the Business Intelligence Java Components (BI Java), but I am wondering if this is the means to connect to our Portal system or whether the Portal connection is done a different way? When I call transaction RSPLAN -
    > Hit on 'Start Modeler'. -->Log on to J2EE/PORTAL, I am directed to the "webdynpro" URL. I receive the following error message "The system is unable to interpret the SSO ticket received". We already have SSO configured between BI and the Enterprise Portal, so does it need to be configured for BI also and if so why?
    Regards,
    Janice

  • Solaris 10 8/07 Install hangs awaiting keyboard input

    I have a W2100z Java Workstation that I am trying to install S10 8/07 on. When it first powers up, I get the standard bios prompts and can hit F2/F8 to customize things as I wish.
    However, when I start the Solaris install from CD, after the OS installer is loaded, it first prompts for 1, 2, 3, 4, ... choices (1 being an interactive install). No amount of keyboard punching seemed to get it to make a choice. So after about 30 seconds or so, it times out and presumes interactive install.
    After a bit, it loads a text-based window to let me choose a language. Just move the cursor around, select a language, and then hit F2 to continue. Unfortunately, it does not recognize any keyboard input and just sits there comatose for as long as I choose to wait.
    So, perhaps I have a keyboard issue, so I swapped out a Kensington for a Dell keyboard. That didn't work so I acquired a Sun keyboard. That doesn't work either. I've also plugged the keyboard into every USB slot I could find (two on the front and 3 on the back), all to no avail.
    Now, Solaris 11 from the SXDE has no problem booting and installing on this computer with all of those keyboards. Unfortunately, that is academic in that I need to run S10.
    So what is the magic to getting the W2100z to boot/install Solaris 10?

    After much gnashing of teeth and pulling of hair, I found an BIOS upgrade for the W2100z. The keyboard now is recognized and the bits are installing.

  • How do i get keyboard input?

    When I wrote programs in my high-school AP class we always imported a keyboard class and used Keyboard.readInt or .readChar or whatever type. I've downloaded the keyboard class but don't know where to put it so I can import it to my programs and I don't know of any other ways to get keyboard input and the string tokenizer method is a bit confusing. Any help would be much appreciated, thanks a lot.

    Hello Fignut,,
    this is the forum for the JavaHelp product, not for general java programming questions.
    Unfortunately I have no supernatural powers to know how your Keyboard class looks like, so I can offer only a solution with the standard API
        String line;
        try
        { BufferedReader in = new BufferedReader (new InputStreamReader(System.in));
          System.out.println("Enter your text. Finish with <Ctrl>Z and <Ret>.\n");
          while((line = in.readLine()) != null)
          { System.out.println("Echo: "+line);
          in.close();
        catch (Exception e)
        { System.out.println(e);
        }Regards
    J�rg

Maybe you are looking for

  • Safari will not open for me. Keep quiting unexpectedly.

    I was on pinterest and clicked on a link that ended up closing out safari. Since then, I can't open Safari. It keeps saying Safari quits unexpectedly. I can't resolve the matter. Here's the error report: Process:           Safari [588] Path:         

  • External Table Help

    I have created an external table but when i try to select data it seems to be empty, where could be the problem? Thanks

  • T400 display issues using XP Pro 32 bit

    I recently was given this notebook which was running server 2008. I reformated the drive using XP Pro, for the time being. It will be uograded to Windows 7 once the hard drive is upgraded and more memory is added. The problem is I want to use the ATI

  • Laptop wont recognise i-pod

    trying to transfer music laptop to i-pod, message reads applianc switched off.IT IS NOT.

  • Where clause with null values

    I need to have a where clause but either/both of the two attributes compared could be null. How can I make this work, atm it just returns no records even though rows do exist. Thanks