3 Replies Latest reply on Dec 18, 2006 3:44 PM by Peter Johnson

    Terminate Batch Job

    jk;l jkl; Expert

      When JBoss is shut down, it prompts "Terminate Batch Job" after closing down most of its stuff, to which you must answer Y or N.

      What does this mean, and what should I answer? As a beginner, I really have no idea.


        • 1. Re: Terminate Batch Job
          Peter Johnson Master

          Look in run.bat, the next to the last line states:

          if "%NOPAUSE%" == "" pause

          The pause command (look it up in Windows help) displays the message in question.

          Usually, a developer places a line like this at the end of a batch file to prevent the command window from closing automatically if the user double-clicked the batch file in Explorer, rather than running it from a command prompt. If you like, you can edit the file to remove the line, or you can set the NOPAUSE environment variable to any value and the pause is skipped.

          • 2. Re: Terminate Batch Job
            Dale Frye Newbie

            The pause command gives:

            Press any key to continue . . .

            The "Terminate Batch Job" is coming from inside JBoss. If you press the 'n' key you will then get the pause prompt.

            I would like to get rid of this. Is there any way to turn it off?

            • 3. Re: Terminate Batch Job
              Peter Johnson Master

              The "Terminate Batch Job" comes from the command prompt (cmd.exe) when you kill (via ctrl-c) an application started from a batch file. cmd.exe wants to know if it should continue processing the rest of the batch file even though the application aborted. The typical answer to get around Windows annoyances is to switch to Linux. Another alternative would be to use the shutdown.bat script to stop the app server (and set the NOPAUSE env var so you don't get the 'continue' prompt).