Restarting JBoss the fun way

If you use JBoss in your development environment (outside of your IDE), you might find yourself restarting it several times a day.

Since I don’t feel like pressing Ctrl+C, answering Y for the redundant “Terminate batch job (Y/N)?” question and then starting the server again, I wrote a small script that would restart the local JBoss if it’s running or just start it if it’s not.

Place the following (Windows version) script in your JBoss bin directory.

@echo off

rem If JBoss is already running try to restart
set NOPAUSE=true
call shutdown.bat -S -e=10 > nul
if %ERRORLEVEL%==0 goto RESTARTED_EXISTING

title JBoss
cls
call run.bat

:RESTARTED_EXISTING

It's only fair to share...
Share on FacebookGoogle+Tweet about this on TwitterShare on LinkedIn

Leave a Reply