Skip to content

Instantly share code, notes, and snippets.

@uuklanger
Created December 24, 2016 06:22
Show Gist options
  • Save uuklanger/03b8f397fbc13da3ea55cddb45075d71 to your computer and use it in GitHub Desktop.
Save uuklanger/03b8f397fbc13da3ea55cddb45075d71 to your computer and use it in GitHub Desktop.
@echo off
C:
REM =======================================================================
REM Usage:
REM 1. Copy into a directory where you keep scripts
REM 2. Check the "My Locations" to ensure they align with your environment
REM 3. Confirm JAVA and Tomcat environment
REM 4. Launch and check for dysoweb-tomcat*.txt in your logs directory
REM
REM -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
REM My Locations
REM
REM * MY_INSTALL_DIR is where you put your tomcat installations
REM * DYSOWEB_TOMCAT is the folder for tomcat where bin is within.
REM
set MY_INSTALL_DIR=C:\Work\BeamOn
set DYSOWEB_TOMCAT=dysoweb-tomcat-1.0.25
set LOGS_DIR=C:\logs
REM -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
REM Java Tomcat
REM
set CATALINA_HOME=%MY_INSTALL_DIR%\%DYSOWEB_TOMCAT%
set CATALINA_OPTS=-Xmx4096m -XX:MaxPermSize=512M -XX:PermSize=256M
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_79
set JRE_HOME=C:\Program Files\Java\jre7
set JAVA_OPTS=-Dcom.requea.testmode=false
set LAUNCH_MODE=start
REM -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
CD %MY_INSTALL_DIR%\%DYSOWEB_TOMCAT%\bin
echo %date% %time% > %LOGS_DIR%\%DYSOWEB_TOMCAT%_%LAUNCH_MODE%.txt
echo JAVA_HOME is %JAVA_HOME% >> %LOGS_DIR%\%DYSOWEB_TOMCAT%_%LAUNCH_MODE%.txt
echo JRE_HOME is %JRE_HOME% >> %LOGS_DIR%\%DYSOWEB_TOMCAT%_%LAUNCH_MODE%.txt
echo JAVA_OPTS is %JAVA_OPTS% >> %LOGS_DIR%\%DYSOWEB_TOMCAT%_%LAUNCH_MODE%.txt
echo CATALINA_HOME is %CATALINA_HOME% >> %LOGS_DIR%\%DYSOWEB_TOMCAT%_%LAUNCH_MODE%.txt
echo CATALINA_OPTS is %CATALINA_OPTS% >> %LOGS_DIR%\%DYSOWEB_TOMCAT%_%LAUNCH_MODE%.txt
echo Working Dir is %CD% >> %LOGS_DIR%\%DYSOWEB_TOMCAT%_%LAUNCH_MODE%.txt
type \logs\%DYSOWEB_TOMCAT%_%LAUNCH_MODE%.txt
REM -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
catalina.bat %LAUNCH_MODE%
@echo off
C:
REM =======================================================================
REM Usage:
REM 1. Copy into a directory where you keep scripts
REM 2. Check the "My Locations" to ensure they align with your environment
REM 3. Confirm JAVA and Tomcat environment
REM 4. Launch and check for dysoweb-tomcat*.txt in your logs directory
REM
REM -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
REM My Locations
REM
REM * MY_INSTALL_DIR is where you put your tomcat installations
REM * DYSOWEB_TOMCAT is the folder for tomcat where bin is within.
REM
set MY_INSTALL_DIR=C:\Work\BeamOn
set DYSOWEB_TOMCAT=dysoweb-tomcat-1.0.25
set LOGS_DIR=C:\logs
REM -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
REM Java Tomcat
REM
set CATALINA_HOME=%MY_INSTALL_DIR%\%DYSOWEB_TOMCAT%
set CATALINA_OPTS=-Xmx4096m -XX:MaxPermSize=512M -XX:PermSize=256M
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_79
set JRE_HOME=C:\Program Files\Java\jre7
set JAVA_OPTS=-Dcom.requea.testmode=false
set LAUNCH_MODE=stop
REM -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
CD %MY_INSTALL_DIR%\%DYSOWEB_TOMCAT%\bin
echo %date% %time% > %LOGS_DIR%\%DYSOWEB_TOMCAT%_%LAUNCH_MODE%.txt
echo JAVA_HOME is %JAVA_HOME% >> %LOGS_DIR%\%DYSOWEB_TOMCAT%_%LAUNCH_MODE%.txt
echo JRE_HOME is %JRE_HOME% >> %LOGS_DIR%\%DYSOWEB_TOMCAT%_%LAUNCH_MODE%.txt
echo JAVA_OPTS is %JAVA_OPTS% >> %LOGS_DIR%\%DYSOWEB_TOMCAT%_%LAUNCH_MODE%.txt
echo CATALINA_HOME is %CATALINA_HOME% >> %LOGS_DIR%\%DYSOWEB_TOMCAT%_%LAUNCH_MODE%.txt
echo CATALINA_OPTS is %CATALINA_OPTS% >> %LOGS_DIR%\%DYSOWEB_TOMCAT%_%LAUNCH_MODE%.txt
echo Working Dir is %CD% >> %LOGS_DIR%\%DYSOWEB_TOMCAT%_%LAUNCH_MODE%.txt
type \logs\%DYSOWEB_TOMCAT%_%LAUNCH_MODE%.txt
REM -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
catalina.bat %LAUNCH_MODE%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment