Index: /other-projects/trunk/gs3-webservices-democlient/gs3democlient.bat
===================================================================
--- /other-projects/trunk/gs3-webservices-democlient/gs3democlient.bat	(revision 15226)
+++ /other-projects/trunk/gs3-webservices-democlient/gs3democlient.bat	(revision 15226)
@@ -0,0 +1,139 @@
+@echo off
+set LANGUAGE=en
+
+
+::  -------- Run the GS3DemoClient on Windows --------
+
+:: This script must be run from within the directory in which it lives
+if exist gs3democlient.bat goto start
+    if "%LANGUAGE%" == "en" echo This script must be run from the directory in which it resides.
+    if "%LANGUAGE%" == "es" echo Este gui¢n deber  ejecutarse desde el directorio en el que reside.
+    if "%LANGUAGE%" == "fr" echo Ce script doit tre excut 
+ partir du rpertoire dans lequel il se trouve.
+    if "%LANGUAGE%" == "ru" echo â®â áªàš¯â €®«Š¥­ ¡ëâì ¢§ïâ š§ €šà¥ªâ®àšš, ¢ ª®â®à®© ®­ à á¯®«®Š¥­
+    goto exit
+
+:start
+
+
+:findJava
+:: ---- Check Java exists ----
+set JAVAPATH=
+
+:: Some users may set the above line manually
+if not "%JAVAPATH%" == "" goto testJava
+
+    :: If it is set, use the JAVA_HOME environment variable
+    if not "%JAVA_HOME%" == "" goto javahome
+
+    :: Check if Java is on the search path
+    echo %PATH%| winutil\which.exe java.exe | winutil\setvar.exe JAVAPATH > setjava.bat
+    call setjava.bat
+    del setjava.bat
+    if not "%JAVAPATH%" == "" goto testJava
+
+    :: Still haven't found anything, so try looking in the registry (gulp!)
+    type nul > jdk.reg
+    regedit /E jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit"
+    type jdk.reg > jdk.txt
+    del jdk.reg
+    type nul > jre.reg
+    regedit /E jre.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment"
+    type jre.reg > jre.txt
+    del jre.reg
+
+    winutil\findjava.exe jdk.txt jre.txt | winutil\setvar.exe JAVAPATH > setjava.bat
+    del jdk.txt
+    del jre.txt
+    call setjava.bat
+    del setjava.bat
+
+    :: If nothing was found in the registry, we're stuck
+    if "%JAVAPATH%" == "" goto noJava
+
+    set JAVAPATH=%JAVAPATH%\bin
+    goto testJava
+
+:javahome
+    set JAVAPATH=%JAVA_HOME%\bin
+
+:testJava
+:: Check that a Java executable has been found
+if "%LANGUAGE%" == "en" echo Checking Java: %JAVAPATH%
+if "%LANGUAGE%" == "es" echo Revisando Java: %JAVAPATH%
+if "%LANGUAGE%" == "fr" echo Vrification de Java: %JAVAPATH%
+if "%LANGUAGE%" == "ru" echo à®¢¥àª  Java: %JAVAPATH%
+if exist "%JAVAPATH%\java.exe" goto checkGS3democlient
+
+:noJava
+    echo.
+    if "%LANGUAGE%" == "en" echo Failed to locate an appropriate version of Java. You must install a
+    if "%LANGUAGE%" == "en" echo Java Runtime Environment (version 1.5 or greater) before running the
+    if "%LANGUAGE%" == "en" echo Greenstone Librarian Interface.
+
+    if "%LANGUAGE%" == "es" echo No se pudo localizar una versi¢n apropiada de Java. Usted deber 
+    if "%LANGUAGE%" == "es" echo instalar un Ambiente de Ejecuci¢n Java (versi¢n 1.5 o superior)
+    if "%LANGUAGE%" == "es" echo antes de correr la Interfaz de la Biblioteca Digital Greenstone.
+
+    if "%LANGUAGE%" == "fr" echo Une version adquate de Java n'a pas pu tre localise. Vous devez
+    if "%LANGUAGE%" == "fr" echo installer un Java Runtime Environment (version 1.5 ou suprieur)
+    if "%LANGUAGE%" == "fr" echo avant de dmarrer Greenstone Librarian Interface.
+
+    if "%LANGUAGE%" == "ru" echo ¥ ã€ «®áì ®¯à¥€¥«šâì ¬¥áâ®­ å®Š€¥­š¥ á®®â¢¥âáâ¢ãîé¥© ¢¥àášš Java.
+    if "%LANGUAGE%" == "ru" echo ë €®«Š­ë ãáâ ­®¢šâì Java Runtime Environment (¢¥àášî 1.5 š«š ¢ëè¥) ¯¥à¥€ ¢¢®€®¬
+    if "%LANGUAGE%" == "ru" echo ¡š¡«š®â¥ç­®£® š­â¥àä¥©á  Greenstone.
+    goto exit
+
+
+:checkGS3democlient
+:: ---- Check that the GLI has been compiled ----
+if exist "GS3democlient.jar" goto checkJavaVersion
+    echo.
+    if "%LANGUAGE%" == "en" echo You need to build the GS3democlient (using "ant build-demo-client")
+    if "%LANGUAGE%" == "en" echo before running this script.
+
+    if "%LANGUAGE%" == "es" echo Usted necesita compilar la GS3democlient
+    if "%LANGUAGE%" == "es" echo (por medio de "ant build-demo-client") antes de ejecutar este gui¢n.
+
+    if "%LANGUAGE%" == "fr" echo Vous devez compiler le GS3democlient (en utilisant "ant build-demo-client")
+    if "%LANGUAGE%" == "fr" echo avant d'excuter ce script.
+
+    if "%LANGUAGE%" == "ru" echo ë €®«Š­ë ª®¬¯š«šà®¢ âì ¡š¡«š®â¥ç­ë© š­â¥àä¥©á GS3democlient
+    if "%LANGUAGE%" == "ru" echo (šá¯®«ì§ãï "ant build-demo-client") ¯¥à¥€ ¢¢®€®¬ íâ®£® áªàš¯â 
+    goto exit
+
+
+:checkJavaVersion
+:: ---- Ensure that the JavaVersion is 1.5.x or more, run CheckJavaVersion with <required java version no prefix> <target exec program name> ---
+	"%JAVAPATH%\java" CheckJavaVersion 1.5 GS3democlient
+	if ERRORLEVEL 0 goto runGS3democlient
+	if ERRORLEVEL -1 goto exit
+
+
+:runGS3democlient
+:: ---- Finally, run the runGS3democlient ----
+echo.
+
+if "%LANGUAGE%" == "en" echo Running the GS3democlient ...
+if "%LANGUAGE%" == "es" echo Ejecutando GS3democlient ...
+if "%LANGUAGE%" == "fr" echo Excution de GS3democlient 
+if "%LANGUAGE%" == "ru" echo ¥ªãéš© ¡š¡«š®â¥ç­ë© š­â¥àä¥©á GS3democlient ...
+
+:: -Xms32M          To set minimum memory
+:: -Xmx32M          To set maximum memory
+:: -verbose:gc      To set garbage collection messages
+:: -Xincgc          For incremental garbage collection
+:: -Xprof           Function call profiling
+:: -Xloggc:<file>   Write garbage collection log
+
+
+:localLib
+    "%JAVAPATH%\java" -jar GS3democlient.jar
+
+:exit
+echo.
+pause
+
+:done
+:: ---- Clean up ----
+set JAVAPATH=
