3 Replies Latest reply on May 19, 2008 11:18 AM by Peter Johnson

    How do I stop a Jboss server using shutdown.bat by passsing

    uttam undale Newbie

      Wel,people i m usin JBoss 4.2.0-GA & want to stop the JBoss server when it is started using shutdown.bat file.

      First time when i started the JBoss & once it was being fully started,i tried to run shutdown.bat file but did not stop the JBoss server.

      if, any arguments do i need to pass in shutdown.bat to make it stop??

      Please Let me knw as soon as possible

      Following shutdown.bat file i used to stop the JBoss but did not work.,

      @echo off
      rem -------------------------------------------------------------------------
      rem JBoss JVM Launcher
      rem -------------------------------------------------------------------------

      rem $Id: shutdown.bat 22783 2004-08-07 19:39:38Z starksm $

      if not "%ECHO%" == "" echo %ECHO%
      if "%OS%" == "Windows_NT" setlocal

      set MAIN_JAR_NAME=shutdown.jar
      set MAIN_CLASS=org.jboss.Shutdown

      set DIRNAME=.\
      if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
      set PROGNAME=run.bat
      if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%

      rem Read all command line arguments

      set ARGS=

      if [%1] == [] goto end
      goto loop

      rem Find MAIN_JAR, or we can't continue

      if exist "%MAIN_JAR%" goto FOUND_MAIN_JAR
      echo Could not locate %MAIN_JAR%. Please check that you are in the
      echo bin directory when running this script.
      goto END


      if not "%JAVA_HOME%" == "" goto HAVE_JAVA_HOME

      set JAVA=java

      echo JAVA_HOME is not set. Unexpected results may occur.
      echo Set JAVA_HOME to the directory of your local JDK to avoid this message.


      set JAVA=%JAVA_HOME%\bin\java


      set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%MAIN_JAR%;%DIRNAME%/../client/jbossall-client.jar

      rem Setup JBoss sepecific properties
      set JAVA_OPTS=%JAVA_OPTS% -Djboss.boot.loader.name=%PROGNAME%

      rem JPDA options. Uncomment and modify as appropriate to enable remote debugging.
      rem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS%


      if "%NOPAUSE%" == "" pause


      please let me knw the changes in the file to stop the Jboss server