How to make a simple 'press  any key...'?

I need to make a simple statement that will pause the screen, until you hit any key or click the mouse? 'press any key to continue...'
is there a way to do it without any popup boxes?
thanks

System.in.read() will block until a key is hit (unfortunately the enter key counts produces 2 chars on windows...)
So my suggestion is:
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Press a key to continue....");
br.readLine();HTH,
Radish21

Similar Messages

  • 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)?

  • How to implement "press any key to continue",please help

    my problem is when the "press any key to close the dos" has displayed in the dos , how can realize to close the dos when i press any button.
    i have try to use system.in.read();but this method doesn't end until i press the "enter"button.

    public class P {
         public static void main(String[] args){
              System.out.println("XXX");
              System.out.println("press any key to close!");
    //want to System.exit(0) when user type the any key.
              BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
              try {
                   int ch = stdin.read();
                   if(ch !=-1){
                        System.exit(0);
              } catch( Exception e ){
    i run this programe by wrote "java P" in the XXX.bat
    Edited by: azhi on Mar 4, 2008 5:23 AM
    Edited by: azhi on Mar 4, 2008 5:29 AM

  • How to fix bootcamp error: No bootable device --- insert boot disk and press any key

    Hi everybody,
    It seems that I triggered a bootcamp "bug" that involve the malfunction of the partition hierarchy after the creation of a new partition.
    After some work I managed to get back again bootcamp in bootable partitions choice window, but if i select it and reboot the system
    i get this error:
    No bootable device --- insert boot disk and press any key
    I think something is wrong with the assignment of the bootable partition, maybe is looking for windows in the wrong partition.
    Any idea?
    OSX 10.10.1
    Bootcamp with Win 7

    I have an ISO image and I burned it to a dvd. I know how to boot back into my Macintosh HD. I just need help on finishing the Windows install. On my iMac it says I have a partition named BOOTCAMP.

  • How do i quit bootcamp when it say "No bootable device -- insert boot disk and press any key"

    Hi,
    How do i quit bootcamp when it say
    "No bootable device -- insert boot disk and press any key"
    cuz i resraart my imac and the nextday i went to use my imac i just say mi that.
    Can you please help mi out ?

    Reboot holding down the Option key between the tone and the apple logo w/pinwheel.  When the boot manager gives you a selection of boot partitions, choose your Lion partition.  Once booted, go to System Preferences > Startup Disk > select your Lion partition.
    Regards,
    Captfred

  • 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

  • HT1199 After trying to install window 7 my new iMac will not reboot back to apple. Black screen "No bootable device -- insert boot disk and press any key". How do I get out of this?

    After trying to install Windows 7 in my new iMac It will not boot up back to Apple. I have a black screen with the following "No bootable device -- insert boot disk and press any key". My iMac did not come with a boot disk. What can I do?

    Try holding down the option/alt key during a restart and see if you can see/select your boot drive there.

  • TA21888 No bootable device -- insert boot disk and press any key how can i fix this problem to may desktop mac?

    No bootable device -- insert boot disk and press any key......thats the words always show every time i start may desktop mac

    Welcome to Apple Support Communities
    Try starting your Mac holding the Option (Alt) key, so you should see all bootable devices on the screen. If you see the OS X volume, select it. After starting, open System Preferences > Startup Disk, and choose the OS X volume.
    If you don't see anything, try holding the key after hearing the startup chime. If you still don't see anything, your hard disk could be damaged

  • HP Pavilion g6-2330dx. "No Boot Device. Insert boot disk and press any key" Memory test failed

    Hi. So I am trying to help a friend with her laptop. It's a HP Pavilion g6-2330dx.
    Product #: D1C01UA#ABA
    Serial #: [Personal Information Removed]
    Windows 8
    ADATA 4GB RAM
    Toshiba 640GB HDD from the looks of it.
    The laptop is unable to boot into Windows, so I suspect the hard drive. But I ran the hard drive test and it passed all the tests. The SMART test and both the short and long test. I ran the tests multiple times and it passed each time. I tried reseating the hard drive and still no go. I also removed the HDD and connected it to my desktop PC to see if it detects and it did. Ran the Windows 7 own HDD test and it passed.
    Currently, there doesnt seem to be any operating system at all on the HDD. When I check, there is a C: drive of ~90GB partition that is ~90GB free, but inside there are Windows files/folders. There is also a D: drive Recovery partition that says ~26GB with only ~2GB free, but when I go inside there's only ~350MB worth of data.
    So then I ran the memory test (in BIOS) and it failed immediately. I reseated the RAM module. I tried the other slot. It still failed. So is it safe to say the memory is the cause of this problem?
    Pressing the F11 key that is supposed to take me to the System Recovery only leads me back to the black screen with "No Boot Device. Insert boot disk and press any key"
    I even tried to install Windows 7 to see if it'll work. I was able to get the laptop to boot/read off the Windows 7. But when I click to install, it asks for a boot device driver or something like that.
    My friend doesn't have the recovery disk either. I guess she lost it.
    Anyway, is it as simple as replacing the memory or could it actually be the HDD (even though it passes)?
    EDIT: This is what the System Log in BIOS says
    0021           Time: 10/13/2014
    03F0           Time: 10/13/2014
    03F0           Time: 10/13/2014
    The date was the first time I ran the tests. I havent received those numbers (error codes?) since.
    EDIT: Just for kicks, I ran Memtest 2.11 just now (forgot I had the disc) and it immediately went red with thousands of errors, hah.

    Hi bghs,
    Welcome to the HP Forums!
    It is a fantastic place to find answers and information.
    For you to have the best experience in the HP forum I would like to direct your attention to the HP Forums Guide Learn How to Post and More
    I understand that you were unable to boot into Windows,  and you suspected the hard drive and tested it, but it passed both short and long test.  With that being said and the fact that it also passed  leads me to believe the hard drive is fine.
    You tested the memory and it failed.  You tried reseating and swapping slots but they  still failed the test.
    I would test each card individual with the memtest to determine if it is just one or both cards that have an issue.
    When you installed it in another computer, you did see the recovery partition.  Once the memory issue is resolved, if you are still unable to boot into Windows, I suggest you do a recovery with the minimized image.   Here is a link to Performing an HP System Recovery (Windows 8) to assist you with that process.
    I hope this helps.
    Sparkles1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom right to say “Thanks” for helping!

  • "No bootable device" -- insert book disk and press any key

    Hello, I am having a little problem with my new iMac. I search in google and I don't seem to get an answer...or maybe I just don't know which one I should do...
    This is what happen. When I turn on my iMac it goes to a white screen, then to a black screen saying "No bootable device -- insert book disk and press any key" I can't press any key at all so I try restarting...same message goes.
    Before this happen I did do one thing which I don't know if this is the cause of it. I change the trash can icon...how I did that is I went to...
    Macintosh HD>System>Library>Core Services>Dock>Contents>Resources
    I just replace the trash can image with the new one, same name as the old. It did change but then this black screen message start happening...
    I search on google, some people say to hold alt-option key when you are in the white screen and then enter your drive from there. I did that and that is how I get to here to ask you guys...how can I get rid of that black screen?
    Some people say you have to reinstall Windows 7 under Bootcamp or something...but I dont have Windows 7 in this iMac. I still did try going to Bootcamp and reinstall things but once I click continue, it said "To create a bootable USB drive for Windows 7 or later version installation, select the Windows ISO image, select a destination USB drive, and then click Continue." But I don't have a ISO image...
    Anyway so that is why I need help, I don't know how I can get rid of the black screen so I don't have to always hold alt-option to get in to my computer.
    Please help if you know how to fix this. Thank you so much!!!

    Sounds like hardware problems, make appointment with Apple to have them check it out for you.

  • Help with "No bootable Device -- Insert boot disk and press any key" problem

    Alright, I am on an Early 2011 17inch macbook pro.  I have removed the superdrive to install a secondary disk drive for mass storage, then replaced the original one with an SSD blah blah blah.  I do everything from the books, run bootcamp, make my USB windows 7 bootable in Bootcamp, go through everything and allocate 65gb towards windows.  I have tried 4 different USB sticks and 3 different ISOs.  Every time I try it, I get the same "No bootable device -- insert boot disk and press any key".  I then have to hold down the power button, then restart, hold down option/alt key, and boot regularly into mac.  I also read that holding option/alt whilst starting the macbook pro will show the windows USB stick, well it never appears.  I dont know what I need to do, what I am doing wrong, but nothing is working.  I guess the last thing I have to try is buying a superdrive and burning ISO to disc then try that.  But I dont want to go out and spend more money.  Other people have gotten it to work just fine from USB, I dont know what I must do or what I am doing wrong...
    Open to suggestions and in desperate need of help.  Anything is appreciated.
    Thanks!

    Don't bump
    get a new usb2 only flash drive and try the solution posted by kunu here and report back
    https://discussions.apple.com/thread/5105056?tstart=0
    How to install Bootcamp on a 2009 Macbook Pro that does not have a disc drive

  • 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 disc and press any key

    Hello, I'm trying to install Windows 7 on BootCamp. I have iMac 2010. My CD-ROM is broken, i can't put CD into it. So, i use external CD-ROM. I burned DVD with windows 7 ISO file, started BootCamp Assistant, My computer restarted and then i have black screen with "No bootable device -- insert boot disc and press any key
    So i can't continue installing Windows. On Mac os DVD is visible and everything is OK, but when restarting - i cant boot from it. How to install it?
    Thank you.

    hrsrt wrote:
    I burned DVD with windows 7 ISO file
    Just burning a ISO onto a DVD wont make the DVD bootable.
    Look here: http://support.microsoft.com/kb/977640
    Lupunus

  • Recovery fail - "No bootable device -- insert boot disk and press any key"

    Hello,
    I have a problem with Recovery. I don't have recovery dvd/cd so I decided to use recovery partition. After system reboot I press F11 and click on recovery system. After 100% of progress, recovery tells me something like 'now your system will reboot press continue'. And now. After system reboot I see:
    No bootable device -- insert boot disk and press any key
    I have totally no idea what to do. I read few posts on this forum but I have no Windows 7 CD/DVD and I have no one who can borrow me to install it. I really need my computer back in few hours to work.
    Looking for help from You.
    My computer: HP Pavilion dv7-6b40ew, Windows 7 Home Premium

    Hi,
    Assuming this is just a problem with the recovery media, here's an alternative option you could try.
    Before trying the following, make sure you can still read the 25 Character Product Activation key on your Windows COA label ( 5 blocks of 5 alpha/numeric sets ).
    An example of a COA Label can be seen Here.
    You can create an installation disc yourself using another PC - just download the correct Disc Image ( this must be the exact same version that originally came with your notebook ) from the link below and use an application such as ImgBurn to burn the ISO correctly to a blank DVD - a guide on using ImgBurn to write an ISO to a disc is Here.  These Images are clean and from a well-respected source, however there are only limited versions available.
    Windows-7 sp1-iso-official-32-bit-and-64-bit
    Use the disc to perform the installation, enter the Windows activation key found on the COA Label when requested and when the installation has completed, use the 'Phone Method' detailed in the link below to activate the OS - this method supported by Microsoft and is popular with people who just want a clean installation of Windows 7 without the additional software load normally bundled with OEM installations.
    http://www.kodyaz.com/articles/how-to-activate-windows-7-by-phone.aspx
    Any additional drivers and software you may need can be found Here.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • 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.

Maybe you are looking for

  • How do I stop Safari from refreshing pages on my iPad?

    This is really annoying.  I am not sure if it is related to time or to memory.  (it's not auto-refresh set by the website).  I often load up several web pages in tabs that I would like to read on the train to work.  Unfortunately when I open the tabs

  • Can I install Design Standard on more than one computer?

    Can I install Design Standard on more than one computer?

  • Finance documents - Letter of credit  - sales order value than  FD value?

    Hi, we are looking at this function of finance documents (ENLO, VN11n). Scenario: Sales Order value :           1 Mio      USD Finance Document value:  0.6 Mio  USD I want to create the FD document now fixed for the amount without specifiying an over

  • A disgusting bug

    Hi, I did a composite aplication that references 4 services. But, wsdl location of the services changed, when I changed the references jdev gives me a lot of erros of compilation, but service was working! all services referenced are correct and I can

  • How do you easily move pictures around in a book design?

    When I place an image into a book, I cant move it arround. The image is placed in a centered position, but it crops it incorectly. I dont need to scale it or crop it, just to move it arroun with-in the bounding image box. Thanks much