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