84N/Arem CDDL HEADER START
84N/Arem The contents of this file are subject to the terms of the
84N/Arem Common Development and Distribution License, Version 1.0 only
84N/Arem (the "License"). You may not use this file except in compliance
84N/Arem with the License.
84N/Arem You can obtain a copy of the license at
84N/Arem See the License for the specific language governing permissions
84N/Arem and limitations under the License.
84N/Arem When distributing Covered Code, include this CDDL HEADER in each
84N/Arem file and include the License file at
84N/Arem add the following below this CDDL HEADER, with the fields enclosed
873N/Arem by brackets "[]" replaced with your own identifying information:
84N/Arem Portions Copyright [yyyy] [name of copyright owner]
828N/Arem Portions Copyright 2006-2007 Sun Microsystems, Inc.
1895N/Arem check that the path does not contain the ^% character which breaks
1920N/Afor %%i in (%~sf0) do set NON_ESCAPED=%%~dPsi..
1895N/AFOR /F "tokens=1-2* delims=%%" %%1 IN ("%NON_ESCAPED%") DO (
1895N/Aif NOT "%%2" == "" goto invalidPath)
1920N/Afor %%i in (%~sf0) do set DIR_HOME=%%~dPsi.
84N/Aset INSTANCE_ROOT=%DIR_HOME%
2650N/Aif "%OPENDS_JAVA_BIN%" == "" goto checkOpenDSJavaHome
2650N/Aif "%OPENDS_JAVA_HOME%" == "" goto checkOpenDSJavaHomeFile
2650N/Aif not exist "%OPENDS_JAVA_HOME%\bin\
java.exe" goto checkOpenDSJavaHomeFile
2650N/Aif "%JAVA_BIN%" == "" goto checkJavaHome
2650N/Aset OPENDS_JAVA_BIN=%JAVA_BIN%
2650N/Aif "%JAVA_HOME%" == "" goto noJavaHome
2650N/Aecho Error: OPENDS_JAVA_HOME environment variable is not set.
2650N/Aecho Please set it to a valid Java 5 (or later) installation.
1895N/Aecho Error: The current path contains a %% character. OpenDS cannot
1895N/Aecho be installed on a path containing this character.
1186N/Aecho ERROR: The detected Java version could not be used. Please set
2650N/Aecho OPENDS_JAVA_HOME to to a valid Java 5 (or later) installation.
1194N/AFOR %%x in ("%DIR_HOME%\lib\*.jar") DO call "%DIR_HOME%\lib\
setcp.bat" %%x
1591N/Aset CLASSPATH=%DIR_HOME%\classes;%CLASSPATH%
1186N/Arem Test that the provided JDK is 1.5 compatible.
1186N/Aif not %errorlevel% == 0 goto noValidJavaHome
2549N/Aif "%~1" == "" goto callLaunch
1777N/Aif %errorlevel% == 50 goto version
1777N/Arem version information was requested. Return code should be 0.