0

I've been looking around for a simple way to stop a java program with a single click from the command line, without having to press the return button. Can anyone suggest a simple and graceful way to achieve this?

user2573222
  • 207
  • 4
  • 15
  • Dont use the console; use GUI. Console is for debugging and logging purposes. If you wanna make some real progress, use Swing or some other GUI API to represent your application graphically. Even if the application is text-based, create a window with a Text Area. You should not use the console for your entire application's lifespan (it really shouldnt be seen by the user at all) – Vince Aug 30 '14 at 14:50
  • @VinceEmigh That approach wouldn't work so well if the application is meant to run in an environment without a windowing system, would it? – jpw Aug 30 '14 at 15:09
  • 1
    @jpw No windowing system, but a cursor just for the hell of it? Sounds pretty far fetched – Vince Aug 30 '14 at 15:12
  • @VinceEmigh True, I missed the part where it said `click` and assumed the OP wanted to use a keypress. – jpw Aug 30 '14 at 15:15

0 Answers0