About press any key!

import java.lang.*;
import java.io.*;
public class hello {
public static void main(String args[]) {
     System.out.println("Press any key to continue...");
     try {
          char ch = (char)System.in.read();
     catch (IOException e) {}
     System.exit(0);
How to really Press any key,becaust it's not contnue until press ENTER key

Input from the console is taken line by line so there is no easy way to do that (and many other simple things related to the console, like clearing the screen).
Saying "press enter" and reading with System.in.read() wouldn't work very well, by the way - the line separator is platform dependent. You should construct a BufferedReader and read from the console with the readLine() method.

Similar Messages

  • Can't install Windows "No bootable device -- insert boot disk and press any key"

    I'm running OSX 10.9.3 on my Macbook Pro 13-inch, Early 2011 and trying to install Windows 7 via Boot Camp Assistant and I'm using a flash drive loaded with bootable copy of Windows 7 Ultimate (legal, if that makes any difference).
    Here's what I've been doing:
    1. Plug in my flash drive, then on Boot Camp Assistant, click "Install Windows 7 or later version"
    2. Set my Windows partition to 45GB and continue... so far so good...
    Then the problem:
    3. My computer restarts, goes to a black screen with the message "No bootable device -- insert boot disk and press any key"
    The flash drive is still plugged in but is it not being recognized or something? Nothing happens when I press any keys.
    I can use OSX just fine by holding down "Alt/Option" on restart, but in my case what can I do to continue further with the Windows install? It's basically an empty partition as of now. Any help appreciated!

    Ive been having this problem and have been trying to figure out how to fix it for almost a week now.  I have a 2011 17" MBP with the superdrive removed.  Ive tried many different methods and many different methods to no avail.  If anyone can help, please do!
    xxzy, have you tried the KUNU method?
    you can find it here:
    Bootcamp without Optical disc drive
    Scroll down to Kunu's post about his solution and see if it works for you.

  • No bootable device -- insert boot disk and press any key, over and over again...

    I've seen a lot of discussions about "no bootable device -- insert boot disk and press any key" but the answers in them don't seem to help me at all.
    from the begining...
    i was tryin to instal windows 7 on my 2014 iMac and after bootcamp prepared the iso on a flash drive, the computer restarted in the windows instalation screen and i chose the "BOOTCAMP" partition.
    After thi i got an error with a mesage that the partition wans not in ntfs, and a question if i wanted to format it. As i am recent to OSX but i was a windows user for quite a while i thought, ok there should be no problem about letting windows format this BOOTCAMP partition so i went ahead and did it. after this i stopped the process because at the moment i seem to recal that in the mac osx bootcamp help there was something about making sure to installing windows to the BOOTCAMP partition. So i canceled the process and restarted the iMac.
    Now i get the  "no bootable device -- insert boot disk and press any key" message over and over.
    I've tryed restarting with alt, alt+cmd+p+r, alt+r, etc and allways get the same message.
    Just before tryin to install windows on a secondary partition had the iMac backup to an external drive on my airport express via time machine.
    Questions.
    are there any other ways to boot into OSX again, or after letting windows format the BOOTCAMP partition all is lost?
    If everything is lost, how do i boot to restore my time machine backup from the external drive?
    all help is apreciated.
    Thanks in advance

    Sorry about that I just realized that Boot Camp may have decompressed your ISO, We can't really do much because Boot Camp may have told the mac to boot  from the flash drive, but now your mac is most likely not being told to  boot from it. (You where able to boot from the drive before so I would  keep it all intact) Is your keyboard wireless (because it can cause your mac to not to register keys being pushed at the Macs start) which this may be preventing you from getting into recovery mode (Command-R) or the OS choosing screen (Option).

  • Boot Camp not installing Windows 7 - "No bootable device, insert boot disk and press any key."

    I need some help with something. A while back, I put a brand new hard drive in my MacBook, a 500 GB model to replace the 120 GB one. I cloned everything successfully to the new drive via Carbon Copy Cloner, but now I want to make a Boot Camp partition on the drive. The SuperDrive in it is defective, so I use an external FireWire drive. So far the Boot Camp Assistant in 10.7 Lion works fine in creating the partition, but when it gets to the part where it tries to boot into the Windows installation disk (32-bit Windows 7 Home Premium, or could the 64-bit work fine as well?), it shows a black scree nwith "No bootable device, insert boot disk and press any key." I try pressing keys, but nothing happens.
    I also tried using rEFIt, but that didn't work out either.
    Here are the specifications of my machine...
    MacBook (Early 2009 model)
    2.0 GHz Intel Core 2 Duo processor
    4 GB of RAM
    500 GB SATA hard drive
    Dual-layer SuperDrive (defective, may replace it once I have the cash)
    NVIDIA GeForce 9400M graphics chip
    Mac OS X 10.7.2 Lion
    Can anyone help me out with this? Is there some sort of workaround?

    Wiley207 wrote:
    Believe it or not, it was the FireWire drive that was the problem! I managed to successfully install Windows 7 using an external USB DVD drive!
    Well I am truly staggered, I have tried this on two different MacBook Pros, with three different external USB optical drives. Don't know if you googled as I suggested but you would find hundreds of others who have found same thing. The exception is MacBook Air which works with the Apple writer, but I don't know much about this.
    Were you doing any of the special workarounds with refedit etc?
    What model USB DVD drive?

  • "Insert Boot Disk and press any key"

    Hey guys, I tried to use bootcamp to install windows, and it looks like i messed up big time.
    Using a late 2013 iMac with a USB disk drive, Windows 7 Home 64 bit on DVD, and two external HDs.
    I consulted a bootcamp guide. Reformatted the externals to what it said.
    Kept trying to let bootcamp get the windows updates, but it would always get stuck. So I downloaded the 5.0 updates it said it required and put it in one of the external HDs.
    It finally let me start installing windows. It got to the point where the screen was black and it said, "Starting Windows". It was stuck on that for hours. Now it is stuck on a black screen saying "No bootable device- insert boot disk and press any key".
    I have restarted many times, holding down command, option and control on different times, nothing seems to work.
    Rather nervous, please help.

    I'm having the same problem. If I take out the USB then hit option key it will at least boot normally.
    However, I am completely unsucessful in creating a Windows partition.
    I was as the "Genius Bar" for over 3 hours yesterday and none of the "Geniuses" had any idea about how to create a Windows partion in the first place.
    Is this seriously so complicated?
    I see the other forums where they are manipulating code? I doubt that any of the "Geniuses" have been trained to do this, otherwise they would have suggested it yesterday.
    Why is creating a Windows partition in Mavericks so complicated? Anyone??

  • No bootable device - Please insert boot disk and press any key

    So I tried all yesterday to get bootcamp to work, and this is what happens. I get through all the steps of bootcamp with my USB, and when it restarts, it comes up with an error on a black screen: "No bootable device - Please insert boot disk and press any key". I checked that I have all the support files downloaded, but it just doesn't work. How can I fix this so that it recognizes my USB? I found this thread, but when I follow the first command that the answer does in the terminal, it doesn't work. Does anyone know the solution to get my computer to recognize my USB? Or be able to fix that command in the thread I linked? I'm on a Macbook Pro 2011 running 10.8.5 Mountain Lion, trying to install Windows 7 64-bit with a USB drive. Please HELP!

    Since your MacBook Pro shipped with an Optickal Drive, Boot Camp it looking to that optical drive for the Windows bootable install media.  My guess is that you "hacked" your configuration to get the USB installation options as they weren't there on teh stock Mountain Lion install on a Late 2011 MBP.
    In the many threads about people who have done what you seem to be trying you will see thant some claim that just putting a disc in the optical drive will allow them to continue the installation from the USB stick.  That might work for you, or it might not.  If not, just use the Optical drive for your installation.

  • When I turn on my iMac, it shows a black screen and says 'No bootable device - enter boot cd and press any key'.  Not sure how to fix this.

    When I turn on my iMac, it shows a black screen and says 'No bootable device - enter boot cd and press any key'.
    I'm not sure what to do, I did not recieve a cd with my mac to boot it up (I ordered it online).
    Also I can't find my harware serial number (I've tried many times to input what I thought it may be from my receipt).  I saw that I need this number to contact apple support, my 90 day complimentary support is still valid so I wish to contact them.
    I don't know much about apple products as this is my first apple computer so any information is helpful.

    Hold down the Alt/Option-key at startup of your iMac to get the Boot Selection screen.
    From that choose to boot into OSX.
    Once in OSX go to System Preferences then Startup Volume and reset your OSX to be the default.
    The new iMacs have OSX 10.7 Lion preinstalled and don't come with any CD/DVD anymore.
    Instead OSX Lion includes a new feature called "Lion Recovery".
    Have a read here About Lion Recovery
    Stefan

  • How to repair "No bootable device insert disk and press any key" problem?

    I was browsing sites using Google Chrome when all of a sudden, my laptop completely turned off. I turned the power back on only to find the error message "Intel UNDI, PXE-2.1 (build 082)" appear in white letters, followed by a bunch of other error messages, ending with, "No bootable device insert disk and press any key". Whenever I try restarting my laptop, the same error messages show up.
    I've been reading about Toshiba laptops, to try to remedy this issue, and I've learned that as of 2007, Toshiba discontinued the recovery disks that had always accompanied the laptops, and instead, allow you to totally restore your computer without the help of a disk. (The model of my laptop is Satellite L300D - 01P).
    Now, apparently to restore a Toshiba laptop, you're supposed to press the '0' key while also pressing the power button, but when I do this, there is a beeping noise (which is apparently supposed to happen), but the error messages (ending with "No bootable device insert disk and press any key") still show up. Other than the affirmative beeping noise, no changes occur.
    Anyone had this problem or have any suggestions of how to fix it?
    Thanks so much.

    >...and I've learned that as of 2007, Toshiba discontinued the recovery disks that had always accompanied the laptops, and instead, allow you to totally restore your computer without the help of a disk. (The model of my laptop is Satellite L300D - 01P).
    Have you also learned that you SHOULD create recovery DVD using preinstalled Toshiba recovery disc creator tool? When something goes wrong with HDD you can use this disc for operating system installation. This is clearly described in Users manuals document.
    Back to your problem:
    I don't know for sure but Im afraid you have some problem with HDD controller or HDD itself.
    Is HDD recognized in BIOS settings (F2 at start up)?

  • Nokia 822 error unable to reboot message to press any key to shut phone down.

    Windows Phone error unable to reboot message to press any key to shut phone down. No screen available to press, help.

        Thats definitely not good, respond. We are here to help get your phone working again. Have you tried a forced reboot by chance? Please hold down the Power keys for about 10 seconds. Do you recall anything that may have been processing when this occurred? Any new updates prior?

  • Ok i get this error when hooking my dvd drive up and tring to use my windows 7 cdNo Bootable device. Insert boot disk and press any key. i have tried to use command key i see the cd icon and hit that and i get the error

    ok i get this error when hooking my dvd drive up and tring to use my windows 7 cdNo Bootable device. Insert boot disk and press any key. i have tried to use command key i see the cd icon and hit that and i get the error

    Wiley207 wrote:
    Believe it or not, it was the FireWire drive that was the problem! I managed to successfully install Windows 7 using an external USB DVD drive!
    Well I am truly staggered, I have tried this on two different MacBook Pros, with three different external USB optical drives. Don't know if you googled as I suggested but you would find hundreds of others who have found same thing. The exception is MacBook Air which works with the Apple writer, but I don't know much about this.
    Were you doing any of the special workarounds with refedit etc?
    What model USB DVD drive?

  • [865PE/G Neo2 Series] DRAM Timing is too tightly, Press any key to reset DRAM timing

    hello,
    i need some help.
    I have been using this system for 1 year and 4 months now. A few days ago, when I booted up my computer, the message "DRAM timing is too tightly. Press any key or DEL to reset DRAM timing." appeared before it started detecting hard drive and CD-ROMS. I pressed a key and the computer continued as normal.
    This morning, the problem got worse. I started my PC but my screen remained blank. The HDD light and CD-ROM light came on but the power light remained off. I turned off the PC by holding the power switch. When i turned it on again, it was the same situation but the power light started blinking. I turned off the PSU power from my wall socket and waitied about 1 minute. I turned it on again and the power light started blinking again but slower this time. I repeated the on/off steps by using the power button 2-3times. Finally, I tried pressing a few keys on my keyboard and the power light stopped blinking and remained green. I turned the PC on/off again and this time, it succeded in booting up.
    And the DRAM messge appeared again.
    I was like trying to start a car on a cold day... only after turning the key a few times did the engine start....
    I've no idea what is happening here.
    My specs are:
    Intel P4 3.0C GHZ L2 512KB, FSB 800MHZ, 478 PIN
    2x PC400 512MB DDR CL2.5
    865PE Neo2-PLS
    400W Power supply
    Western Digital HDD 120GB SATA
    Maxtor 120GB HDD SATA
    Maxtor 60GB HDD IDE
    DVD Writer
    Creative SB Audigy 2 ZS
    Leadtek FX5900 LX 128MB
    Thanks
    Lifehalo

    hi,
    i smelled a burning smell from my power supply. i am replacing my power supply. i don't know if it was the cause of the dram timing thing.
    i'll post here again after i replace my power supply. Thanks!!
    Quote from: Thunder on 13-May-05, 21:00:44
    When the comp boots up: press the 'delete' key to enter BIOS
    Move the marker to 'Advanced Chipset Features' and press enter
    Set 'Configure SDRAM Timing by SPD' setting to [Enabled] and press enter press enter
    Press F10, and you woulg get the question 'Save changes and EXIT?', Answer 'YES* and press enter.
    If this would'nt help, post back here.

  • Anyway to get rid of JMicrom message "Press any key to continue..."?

    Hi folks
    See no sense viewing this message during boot.
    Anyway to get rid of JMicron message "Press any key to continue..."?

    Quote from: Maesus on 23-February-07, 18:51:57
    Disable JMicron in the BIOS
    Could you maybe tell a little bit more about how to do that ? (presuming it ain't a joke, since I got the feeling that disabling JMicron would also disable my optical devices :O)

  • Satellite A60 Resume failure and press any key to continue

    I have a problem with my satellite A60.
    I have had the computer for about a year and a half and have never had any serious problems with it of any kind. However last week the keyboard started to fail, first with only a few keys out, then the full keyboard.
    This never bothered me much because I am quite familiar with Toshiba computers. So I plugged in an external keyboard and I was back in business.
    I used it fine up until now but I put the computer into hibernate last night and when I got up this morning it says "resume failure and press any key to continue".
    I press keys and nothing happens, it just stays at that screen. I try to access BIOS by pressing esc when I turn the computer on and priority is set to BOOT not RESUME, hover it wont let me highlight it to change it anyways. The computer wont let me boot from cd. Basically its just stuck at that screen and thats it.
    I am wondering if there is another way around this or is my computer finished for good. I was running linux fedora the time of the crash.

    Sounds tricky but its not unresolvable..
    This sounds strong like a hardware issue, but I will not say it for sure.
    That keyboardthing can be a defective keyboardcontroller, because your error description is describing a similar case which I had with my machine.
    I send the machine to my local servicepartner and they exchanged my mainboard and the keyboard and after the repair the error, I had, never bothered me again.
    Just a little question: does some fluids come on your keyboard?
    nice weekend
    Greets

  • Please Help!! I deleted the folder System en Macintosh HD and now when i on my mac it says Disk Error Press Any  Key To Restart Please HELP !!

    I deleted the folder System en Macintosh HD and now when i on my mac it says Disk Error Press Any  Key To Restart Please HELP !!

    Reinstall Mac OS X.
    (59450)

  • My Macbook pro has the message on a black screen need the reboot disc then press any key to continue. Any Ideas, because I have no discs.

    My Macbook pro has the message on a black screen need the reboot disc then press any key to continue. Any Ideas, because I have no discs.I am running Lion OS

    Was this a dark gray screen that appeared with the message to restart the computer in five different languages? If so that's a kernel panic. It would help if you can post the panic log: Mac OS X- How to log a kernel panic. Also visit The XLab FAQs and read the FAQ on diagnosing kernel panics.

Maybe you are looking for

  • Usa in the uk?

    I heading to the states, anyone know if i buy the iphone 4 over there and bring it back it will work in the uk?

  • How to restrict database user.

    I need to create a database user who have only read only access to the 10g database. Is there any note which will help on this. Thanks in advance. regards, manish

  • How do I save pictures from text messages to my albums?

    I'm trying to save pictures from a text message my sister sent. I don't use photo stream-- I just want to save it to my pictures the way I could with iOS6. The only options I'm given is to delete or send it as a text message to someone else-- there i

  • Security update 2007-005 and Imovie problem

    Yesterday my macbook automatically installed security update 2007-005. I later opened Imovie HD 6 and found a problem - when opening, the program title etc was shown in the desktop menu but then the last movie I worked on started to open, putting the

  • Find my iPad Mini not working

    My wife got an iPad Mini Friday. This morning I noticed that Find My iPhone will never show it as online. I checked the configuration. Find My iPad is toggled on. Location Services is On. I just updated the software to iOS 6.0.1, but it didn't work u