How to End an Infinite Loop in BlueJ

Written by doug vintage
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to End an Infinite Loop in BlueJ
Use the debugger window to end infinite loops in BlueJ. (Hemera Technologies/ Images)

BlueJ is an open source IDE (integrated development environment) that utilises the Java programming language. BlueJ is primarily used as an educational tool to teach object-oriented programming and application development. The program interface is far more simplistic than a full-scale IDE, and some basic program features are hidden away in sub-menus. When testing your project in BlueJ, you may run into an infinite loop. Loops will repeat themselves infinitely if the termination conditions of the loop are handled incorrectly. To return to your project and fix the code, you first need to stop your program and end the infinite loop.

Skill level:

Other People Are Reading


  1. 1

    Click on "View" in the main tool bar at the top of the BlueJ application window.

  2. 2

    Click "Show Debugger" in the "View" menu drop-down box.

  3. 3

    Click the "Halt" button from within the debugger to stop the program and end the infinite loop.

Tips and warnings

  • Press "Ctrl + D" on your keyboard to access the debugger quickly.
  • If your infinite loop includes user input, you will need to satisfy the input after ending the program with the "Halt" button. Once the user input is satisfied, the infinite loop will be stopped.

Don't Miss


  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.