IBM Support

How to stop running the Java program if that program runs from the command line and is struck in an infinite loop

Troubleshooting


Problem

How to stop running the Java program if that program runs from the command line and is struck in an infinite loop

Resolving The Problem

Question:

How do I stop running the Java program if that program runs from the command
line and is struck in an infinite loop?


Answer:

You could press Ctrl-C to stop running the program, if one of the Java programs
you run from the command line is stuck in an infinite loop.

Usually in a program where a loop does not end, something else in the program
is set up to stop execution in some way. For example, a loop could continue
indefinitely while the program waits for the user to click a button labeled
EXIT. However, if a program isn't working correctly, one bug you'll run into
during testing is a loop that cannot be stopped. This bug is called an infinite
loop because the program will loop forever.



[{"Product":{"code":"SSSHTR","label":"Rational TeamTest"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF033","label":"Windows"}],"Version":"2003.06.00","Edition":"","Line of Business":{"code":"","label":""}}]

Historical Number

114226473

Document Information

Modified date:
16 June 2018

UID

swg21120014