setup.bat revision 1777
1771N/A
1771N/A@echo off
1771N/Arem CDDL HEADER START
1771N/Arem
1771N/Arem The contents of this file are subject to the terms of the
2362N/Arem Common Development and Distribution License, Version 1.0 only
1771N/Arem (the "License"). You may not use this file except in compliance
2362N/Arem with the License.
1771N/Arem
1771N/Arem You can obtain a copy of the license at
1771N/Arem trunk/opends/resource/legal-notices/OpenDS.LICENSE
1771N/Arem or https://OpenDS.dev.java.net/OpenDS.LICENSE.
1771N/Arem See the License for the specific language governing permissions
1771N/Arem and limitations under the License.
1771N/Arem
1771N/Arem When distributing Covered Code, include this CDDL HEADER in each
1771N/Arem file and include the License file at
1771N/Arem trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
1771N/Arem add the following below this CDDL HEADER, with the fields enclosed
2362N/Arem by brackets "[]" replaced with your own identifying information:
2362N/Arem Portions Copyright [yyyy] [name of copyright owner]
2362N/Arem
1771N/Arem CDDL HEADER END
1771N/Arem
1771N/Arem
1771N/Arem Portions Copyright 2006-2007 Sun Microsystems, Inc.
1771N/A
1771N/Asetlocal
1771N/A
1771N/Aset DIR_HOME=%~dP0.
1771N/Aset INSTANCE_ROOT=%DIR_HOME%
1771N/A
1771N/A:checkJavaBin
1771N/Aif "%JAVA_BIN%" == "" goto noJavaBin
1771N/Agoto setClassPath
1771N/A
1771N/A:noJavaBin
1771N/Aif "%JAVA_HOME%" == "" goto noJavaHome
1771N/Aif not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
1771N/Aset JAVA_BIN=%JAVA_HOME%\bin\java.exe
1771N/Agoto setClassPath
1771N/A
1771N/A:noJavaHome
1771N/Aif not exist "%DIR_HOME%\lib\set-java-home.bat" goto noSetJavaHome
1771N/Acall "%DIR_HOME%\lib\set-java-home.bat"
1771N/Aset JAVA_BIN=%JAVA_HOME%\bin\java.exe
1771N/Agoto setClassPath
1771N/A
1771N/A:noSetJavaHome
1771N/Aecho Error: JAVA_HOME environment variable is not set.
1771N/Aecho Please set it to a valid Java 5 (or later) installation.
1771N/Apause
1771N/Agoto end
1771N/A
1771N/A:noValidJavaHome
1771N/Aecho ERROR: The detected Java version could not be used. Please set
1771N/Aecho JAVA_HOME to to a valid Java 5 (or later) installation.
1771N/Apause
1771N/Agoto end
1771N/A
1771N/A:setClassPath
1771N/AFOR %%x in ("%DIR_HOME%\lib\*.jar") DO call "%DIR_HOME%\lib\setcp.bat" %%x
1771N/Aset CLASSPATH=%DIR_HOME%\classes;%CLASSPATH%
1771N/A
1771N/Aset PATH=%SystemRoot%
1771N/A
1771N/Arem Test that the provided JDK is 1.5 compatible.
1771N/A"%JAVA_BIN%" org.opends.server.tools.InstallDS -t > NUL 2>&1
1771N/Aif not %errorlevel% == 0 goto noValidJavaHome
1771N/A
1771N/Aif "%~1" == "" goto callLaunch
1771N/Agoto callJava
1771N/A
1771N/A:callLaunch
1771N/A"%DIR_HOME%\lib\winlauncher.exe" launch "%DIR_HOME%" "%JAVA_BIN%" %JAVA_ARGS% org.opends.quicksetup.installer.InstallLauncher -P setup.bat
1771N/Agoto end
1771N/A
1771N/A:callJava
1771N/A"%JAVA_BIN%" %JAVA_ARGS% org.opends.quicksetup.installer.InstallLauncher -P setup.bat %*
1771N/A
1771N/Arem return part
1771N/Aif %errorlevel% == 50 goto version
1771N/Agoto end
1771N/A
1771N/A:version
1771N/Arem version information was requested. Return code should be 0.
1771N/Aexit /B 0
1771N/A
1771N/A:end
1771N/A
1771N/A