From 5c961270fe3401ebb151b857e9e6bb3443aa0ffc Mon Sep 17 00:00:00 2001 From: jvergara <jvergara@localhost> Date: Wed, 25 Apr 2007 17:13:06 +0000 Subject: [PATCH] Fix for issue 1273 (exception if JAVA_HOME undefined in scripts). --- opends/resource/uninstall.bat | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/opends/resource/uninstall.bat b/opends/resource/uninstall.bat index 931054e..e071367 100644 --- a/opends/resource/uninstall.bat +++ b/opends/resource/uninstall.bat @@ -48,7 +48,12 @@ :noSetJavaHome echo Error: JAVA_HOME environment variable is not set. -echo Please set it to a valid Java 5 installation. +echo Please set it to a valid Java 5 (or later) installation. +goto end + +:noValidJavaHome +echo ERROR: The detected Java version could not be used. Please set +echo JAVA_HOME to to a valid Java 5 (or later) installation. goto end :setClassPath @@ -56,6 +61,10 @@ set PATH=%SystemRoot% +rem Test that the provided JDK is 1.5 compatible. +"%JAVA_BIN%" org.opends.server.tools.InstallDS -t > NUL 2>&1 +if not %errorlevel% == 0 goto noValidJavaHome + if "%*" == "" goto callLaunch goto callJava -- Gitblit v1.10.0