From fe143d9a59ed148e507289420ea7c54bb3daff54 Mon Sep 17 00:00:00 2001 From: jvergara <jvergara@localhost> Date: Wed, 02 Apr 2008 15:16:09 +0000 Subject: [PATCH] Fix for issue 2444 (Commands setup/start/etc... should check Java release and reject unsupported ones) --- opends/resource/bin/_script-util.bat | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/opends/resource/bin/_script-util.bat b/opends/resource/bin/_script-util.bat index 1a0ac23..97d66d2 100644 --- a/opends/resource/bin/_script-util.bat +++ b/opends/resource/bin/_script-util.bat @@ -124,7 +124,9 @@ :testJava "%OPENDS_JAVA_BIN%" %OPENDS_JAVA_ARGS% org.opends.server.tools.InstallDS -t > NUL 2>&1 -if not %errorlevel% == 0 goto noValidJavaHome +set RESULT_CODE=%errorlevel% +if %RESULT_CODE% == 13 goto notSupportedJavaHome +if not %RESULT_CODE% == 0 goto noValidJavaHome goto end :noValidJavaHome @@ -146,6 +148,13 @@ pause exit /B 1 +:notSupportedJavaHome +rem We get here when the java version is 5 (or up) but not supported. We run +rem InstallDS again to see a localized message. +"%OPENDS_JAVA_BIN%" %OPENDS_JAVA_ARGS% org.opends.server.tools.InstallDS -t +pause +exit /B 1 + :noValidHomeWithArgs echo ERROR: The detected Java version could not be used with the set of java echo arguments %OPENDS_JAVA_ARGS%. -- Gitblit v1.10.0