Import cs1.Keyboard doesn't work

Please help I am writing my second program and I have been told
that 'Class cs1.keyboard not found in import' when I compiled it.
My code is....
import cs1.Keyboard;
public class three_int
public static void main (String[]args)
int a,b,c;
float average;
System.out.print ("Enter a number for a: ");
a = Keyboard.readInt();
System.out.print ("Enter a number for b: ");
b = Keyboard.readInt();
System.out.print ("Enter a number for c: ");
c = Keyboard.readInt();
average=(a+b+c)/3;
System.out.println ("The average of a,b and c
is " average".");
What am I doing wrong? My class path is right I'm fairly sure. Is it because I'm using different versions of SDK ?
I'm using SDK1.4 beta and SDK1.2.2, At University the cs1.Keyboard package works perfectly but when I downloaded it from the java website it didn't work.... Can you pls tell me the exact website I can get the version I can use to make cs1.Keyboard package work... Thank you. Your help is greatly appreciated.
Cheers, George

The statement "import cs1.Keyboard;" is telling the compiler to find a java package named cs1 and find a class named Keyboard inside that package.
So your system must have a directory named cs1 that contains a file Keyboard.class. The cs1 directory must be in a directory that is in your Classpath.
If you aren't sure about how your Classpath is set or which directory to put the cs1 directory, you can try to put it into the same directory that three_int.java is in. I'm assumng you CD to the directory that contains three_int.java when you try to compile it.

Similar Messages

  • Can't set up windows on bootcamp, keyboard doesn't work

    okay, i wait through the agony of the windows install non-sense, and it comes up to the part where i have to set up windows (name, accounts, etc.). But when i go to enter all my info, my keyboard doesn't work, or my mouse for that matter. I have a 24" iMac with the wireless keyboard and mouse. I don't know what to do!
    Message was edited by: jayqUon

    Jay:
    Below is excerpt I took from [HERE|http://support.apple.com/kb/HT1461] which mandates using an internal keyboard or a USB keyboard/mouse to install Windows via boot camp.
    Requirements
    To use Boot Camp, you need:
    1. *An Intel-based Macintosh computer with a built-in or USB keyboard and a built-in trackpad or USB mouse.*
    2. Mac OS X 10.5 or later
    3. The latest firmware updates available for your Intel-based Mac.
    4. At least 10 GB of free space on your startup disk (single partition).
    5. A full, single-disc version of Windows Vista, Windows XP Home Edition or Professional with Service Pack 2 or later. Boot Camp does not include Windows. You must provide your own properly licensed installation disc.
    Important: A Windows XP installation disc must include Service Pack 2 (SP2). You cannot install an earlier version of Windows and upgrade to Windows XP, nor install an earlier version of Windows XP and update it to SP2.
    6. Boot Camp Assistant (find it installed in /Applications/Utilities/ on Leopard).
    Axel F.

  • Apple Wireless Keyboard doesn't work in Vista Ultmate?

    My Apple Wireless Keyboard doesn't work (not response) on Vista Ultmate but its works properly in Mac OS X 10.5.2...
    Should I install the driver in Mac OS first or update the keyboard firmware?
    Or install a driver for Windows Vista (I can't find any on web...)
    Please kindly help! Thanks a lot.

    this problem is fixed, but if anybody has an idea what happened, I would like to know.

  • I have an iMac and my keyboard doesn't work. How can I fix it. Got it in 2011. Also my mouse is acting up

    I have an iMac and my keyboard doesn't work. How can I fix it. Got it in 2011. Also my mouse is acting up

    What OS X are you running and do you have USB or Wireless input devices...?
    For wireless devices, take a look at > Troubleshooting wireless mouse and keyboard issues
    USB keyboards and mice generally don't have connection issues, but they and there cords do occasionally go bad.

  • Problem with XP Pro sp1 install - keyboard doesn't work - MBP

    After using bootcamp to repartition the HD and rebooting with an xp pro sp1 cd, the blue windows installer loads and runs fine up to where you need to press the enter button to install windows or F3 to exit. At this point, the keyboard doesn't work at all and I have to push the power button. I also can not load osx or the osx boot disc, but the xp disc still loads fine. Currently working on slipstreaming a w/ sp2 to see if this will fix the problem. Prior to bootcamp, I upgraded osx and my firmware. Anyone else encounter this?

    You need to use SP2. There is a reason it's recommended by Apple. If you have a valid XP install disk you can easily slipstream it with SP2, which is perfectly legal and effective, and is a relatively painless process.
    http://www.helpwithwindows.com/WindowsXP/winxp-sp2-bootcd.html
    Nick

  • KEYBOARD DOESN'T WORK IN ALL JAVA APPS

    I think there are a bug with Java,
    but some keys of my French keyboard doesn't work with ALL Java APPS (Solaris Management console...), but work fine with all other apps.
    When I use Xsun, there are no problem, all keys work, but with Xorg, some keys doesn't work. (Only in Java Apps).
    I had got this bug with Sun Solaris 10 and Sun Solaris 11 (6/05 Express)
    This is a very nasty bug, I have got a PS/2 keyboard.
    Willits

    Enable multilib repo in /etc/pacman.conf , pacman -Syy and pacman -S flashplugin
    Last edited by Halcyon22 (2010-09-14 13:34:53)

  • The backlight of keyboard doesn't work in win7, with a well setup bootcamp drivers

    The backlight of keyboard doesn't work in win7, with a well setup bootcamp drivers

    Forum and support for Boot Camp:
    http://www.apple.com/support/bootcamp

  • Italian keyboard doesn't work under the gui

    I have an italian keyboard on a x86 Solaris 10 installation.
    All the patch available using Sun Update applied but the keyboard doesn't work, it still works only as a USA keyboard.
    Forcing it as a Italian layout at startup (pressing esc and using the boot utility) make the keyboard work in the consolle with the correct layout but under the gui, after the dtlogin startup, the key doesn't work correctly. Every key is "shifted" of one position, so inserting "root" result in "eiir"
    Even applyng the 118966-08 patch as suggested doesn't work.
    Obiouvsly I used the gnome panel to set the correct keyboard under gnome but with no result
    Both the two type of italian keyboards don't work, the standard one and the 104 "ibm" italian layout.
    All this keyboards work fine on the same PC with both WindowsXP and Linux Ubuntu.
    Any suggestion to fix this ?

    The solution was to reconfigure the X-Server: In a console-window I called kdmconfig and corrected the keyboard settings: it was a US-Keyboard. Nobody knows ... At installation time I configured a german keyboard.
    A remaining problem is that my mouse and keyboard are connected via USB and they are frozzen after boot. First when I physicaly detach both and reconnect them they start working in an ordinary manner. I saw a forum entry which talked about BIOS-settings.

  • How can I do Safe Boot if keyboard doesn't work

    iMac frozen at restart and keyboard doesn't work.  Appreciate any ideas on how I can reboot.

    Do you have a wired or wireless keyboard?  If you have a wireless one, using a wired one temporarily might help with this.  Otherewise, it sounds like you have a hardware failure, possibly hard drive or logic board.  In any case I would then recommend taking it in for a Diagnosis and service.

  • 10.5.6 USB apple aluminum keyboard doesn't work...help!

    After installing 10.5.6 my apple keyboard doesn't work, but the apple mouse plugged into the keyboard works fine. I installed the combo update and it still doesn't work. Any ideas?

    I also have the same problem with a MacMini running MacOS 10.5.6 Server. The Al Apple Keyboard (wired) does not show up in the USB tree. However, the wireless one (over bluetooth) works fine.
    help!

  • Keyboard doesn't work in few games

    Hi,
    I found that in few games for Mac, like Prison Architect letters on keyboard doesn't work, what it can be?
    Mac OS X 10.7.5

    paldepind wrote:Yop.
    You could probably try running without an xorg.conf (still make sure hal is running).

  • My MacBook Pro keyboard doesn't work to log in, but lets me type if I'm logged in as a guest. What do I do?

    My MacBook Pro keyboard doesn't work to log in, but lets me type if I'm logged in as a guest. What do I do?

    OK, some more info.
    I have re-installed os/x and applied all of the updates.
    I have tried to migrate my existing accounts and the problem consistently manifests as below:
    1. In a new user account, I can log in and use the keyboard then logout
    2. If I log in to the migrated user account, the non-numeric keys on the keyboard do not work. If I then log out, and try to log in to another account on the same machine, the non-numeric keys continue not to work.
    This would seem to suggest that as the profiles being migrated are on a machine with the same version of up to date OS/X, the issue lies with either the Macbook Pro (other people have also had keyboard problems) or with the migration assistant not working properly given that the current profiles work fine on another mac.
    Any more ideas anyone?

  • TS1277 HI. I have followed all the appropriate steps above and when I try to enter my 'Password' when asked, my keyboard doesn't work. No key press can be activated at all when trying to enter my password in 'Terminal. And I am in the 'Administrator' user

    HI.
    I am having trouble authorising my Mac Air to my Itunes account. I found a discussion explaining how to go go into 'Terminal', then adding a command. I have followed all those appropriate steps and when I try to enter my 'Password' when asked, my keyboard doesn't work. No key press can be activated at all when trying to enter my password in 'Terminal. And I am in the 'Administrator' user. Can anybody offer any suggestions?? ta

    Does the command that you're trying to enter in Terminal begin with the word 'sudo'?
    If so, your keyboard is working fine. When you type your password after a sudo command, nothing is echoed to the screen for security reasons (not even the * that are normally registered in other user interfaces). However, the program is registering what you type.
    Just type your password and press 'return' and the command will be executed (so long as you type it correctly; if you don't, you'll get an error message).

  • How to import cs1.Keyboard

    How do I get my program to recognize cs1.Keyboard, please? oh, I am totally new to the Java thing so please be clear. Thanks a lot.

    1) Your code has to refer to it. Probably you'd do:
    import  cs1.Keyboard;But I don't know for sure, because cs1.Keyboard is not a standard part of java. It's something your professor or TA or author of the book you're reading, made up. You should ask him/her/them for official instructions.
    2) Make sure that cs1.Keyboard is on your classpath. Probably it's in a jar file, so you'd have to include that jar file in your classpath. The way you do that depends on the OS and/or IDE you're using.

  • On rebooting to install windows get message: 1:2: Select CD rom Boot Type:_    and keyboard doesn't work! type

    Trying to instal windows again (new hard drive) via bootcamp on my oldish Macbook;
    on rebooting to install windows I get a dos screen with the message:
    1
    2
    Select CD rom Boot Type:_  
    and keyboard doesn't work!
    Tried an external keyboard and nothing
    Any ideas?

    To get the disk out restart while holding down the mouse button. To get back to OS X restart while holding the option key and when the boot screen appears select the volume with OS X.

Maybe you are looking for

  • Voicemail not working from mass voicemail

    My work sends out global connect voice messages for school closings, etc. My voicemail does not get a message, it just registers as a missed call. Help please

  • ITunes library .itl file cannot be found or created...

    Tried to access one of the choices on an iTunes Store update via email. Got a screen asking for agreement for new version but rather than launch I got the above message which also did include a default folder location. I clicked OK but nothing happen

  • How can I add an attachment to an aol email?

    How can I add an attachment to an aol email?  The compose window has no toolbar, thus no paperclip icon to add an attachment.

  • Country Version in ECC6.0

    Hi, We are in process of evaluating all SAP Country versions in ECC6.0. We have gone through SAP solution browser but it did not give much detials. Where we can get the delta functionality in SAP ECC6.0 from SAP 4.7 Enterprise for country versions. T

  • Unicode support - unsupported items?

    Hello everyone, I've been looking around for some detailed information concerning the support of Unicode in LabVIEW. There is some valuable information out there, work-around's and whatnot, but there are things that need to be covered still. Some val