_server-script.bat revision 2650
481N/A
481N/A@echo off
481N/Arem CDDL HEADER START
481N/Arem
481N/Arem The contents of this file are subject to the terms of the
481N/Arem Common Development and Distribution License, Version 1.0 only
481N/Arem (the "License"). You may not use this file except in compliance
481N/Arem with the License.
481N/Arem
481N/Arem You can obtain a copy of the license at
481N/Arem trunk/opends/resource/legal-notices/OpenDS.LICENSE
481N/Arem or https://OpenDS.dev.java.net/OpenDS.LICENSE.
481N/Arem See the License for the specific language governing permissions
481N/Arem and limitations under the License.
481N/Arem
481N/Arem When distributing Covered Code, include this CDDL HEADER in each
481N/Arem file and include the License file at
481N/Arem trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
481N/Arem add the following below this CDDL HEADER, with the fields enclosed
873N/Arem by brackets "[]" replaced with your own identifying information:
481N/Arem Portions Copyright [yyyy] [name of copyright owner]
481N/Arem
481N/Arem CDDL HEADER END
481N/Arem
481N/Arem
873N/Arem Portions Copyright 2006-2007 Sun Microsystems, Inc.
481N/A
481N/Arem This script is used to invoke various server-side processes. It should not
481N/Arem be invoked directly by end users.
481N/A
481N/Asetlocal
1920N/Afor %%i in (%~sf0) do set DIR_HOME=%%~dPsi..
481N/Aset INSTANCE_ROOT=%DIR_HOME%
481N/A
481N/Aif "%OPENDS_INVOKE_CLASS%" == "" goto noInvokeClass
2650N/Agoto checkOpenDSJavaBin
481N/A
481N/A:noInvokeClass
481N/Aecho Error: OPENDS_INVOKE_CLASS environment variable is not set.
1304N/Apause
481N/Agoto end
481N/A
2650N/A:checkOpenDSJavaBin
2650N/Aif "%OPENDS_JAVA_BIN%" == "" goto checkOpenDSJavaHome
2650N/Agoto setClassPath
2650N/A
2650N/A:checkOpenDSJavaHome
2650N/Aif "%OPENDS_JAVA_HOME%" == "" goto checkOpenDSJavaHomeFile
2650N/Aif not exist "%OPENDS_JAVA_HOME%\bin\java.exe" goto checkOpenDSJavaHomeFile
2650N/Aset OPENDS_JAVA_BIN=%OPENDS_JAVA_HOME%\bin\java.exe
481N/Agoto setClassPath
481N/A
2650N/A:checkOpenDSJavaHomeFile
2650N/Aif not exist "%DIR_HOME%\lib\set-java-home.bat" goto checkJavaBin
2650N/Acall "%DIR_HOME%\lib\set-java-home.bat"
2650N/Aif not exist "%OPENDS_JAVA_HOME%\bin\java.exe" goto checkJavaBin
2650N/Aset OPENDS_JAVA_BIN=%OPENDS_JAVA_HOME%\bin\java.exe
2650N/Agoto setClassPath
2650N/A
2650N/A:checkJavaBin
2650N/Aif "%JAVA_BIN%" == "" goto checkJavaHome
2650N/Aset OPENDS_JAVA_BIN=%JAVA_BIN%
2650N/Agoto setClassPath
2650N/A
2650N/A:checkJavaHome
481N/Aif "%JAVA_HOME%" == "" goto noJavaHome
481N/Aif not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
2650N/Aset OPENDS_JAVA_BIN=%JAVA_HOME%\bin\java.exe
481N/Agoto setClassPath
481N/A
481N/A:noJavaHome
2650N/Aecho Error: OPENDS_JAVA_HOME environment variable is not set.
1181N/Aecho Please set it to a valid Java 5 (or later) installation.
1304N/Apause
481N/Agoto end
481N/A
481N/A:setClassPath
1194N/AFOR %%x in ("%DIR_HOME%\lib\*.jar") DO call "%DIR_HOME%\lib\setcp.bat" %%x
481N/A
481N/Aset PATH=%SystemRoot%
481N/A
2650N/A"%OPENDS_JAVA_BIN%" %JAVA_ARGS% %SCRIPT_NAME_ARG% %OPENDS_INVOKE_CLASS% --configClass org.opends.server.extensions.ConfigFileHandler --configFile "%DIR_HOME%\config\config.ldif" %*
481N/A
481N/A
481N/A:end
481N/A