文件目录结构如下:
root
--***.jar
--log4j.xml
--lib
--log4j.jar
--*.jar
批处理文件内容如下:
@echo off
REM #
REM # $RCSfile$
REM # $Revision: 1102 $
REM # $Date: 2016-12-17 22:36:48 -0300 (Mon, 07 Mar 2005) $
REM #
if "%JAVA_HOME%" == "" goto javaerror
if not exist "%JAVA_HOME%\bin\java.exe" goto javaerror
set PATH=%JAVA_HOME%/bin
set TURNSERVER_HOME=%CD%\
goto run
:javaerror
echo.
echo Error: JAVA_HOME environment variable not set, Openfire not started.
echo.
goto end
:run
java.exe -DturnserverHome=%TURNSERVER_HOME% -Dlog4j.configuration=file:/%TURNSERVER_HOME%/log4j.xml -jar turnserver.jar
pause
goto end
:end