[greenstone-users] Help!!

From Oran of Greenstone Team
DateFri Nov 21 17:56:50 2008
Subject [greenstone-users] Help!!
In-Reply-To (017c01c94b8e$e735ed00$b5a1c700$-ac-fj)
NOTE: rename the attachment to gli.bat!!

Hi Ron,

Attached is a patched gli.bat file which might fix your 'Access Denied'
problem. It does not use the disk when setting environment variables
like the one shipped with 2.81rc. (Actually there are a few places where
it still does but they probably won't be executed.) Hope this helps.

Also, do check for the existence of gli.log as the output might have
made it in there after all.

Cheers,
Oran.

Ron Vave wrote:
> thanks Anupama, and please relay my thanks to the rest of your team, for
> assisting me. I will wait for that gli.bat file.
>
> ----------------------------------------
> Ron Vave
> Environment unit
> Institute of Applied Science
> Faculty of Science & Technology,
> University of the South Pacific,
> Suva, Fiji.
>
> Office: 3232-977
> Fax: : 3231-534
> ----------------------------------------
>
>
> -----Original Message-----
> From: Anupama of Greenstone Team [mailto:greenstone_team@cs.waikato.ac.nz]
> Sent: 21 November 2008 16:05
> To: vave_r@usp.ac.fj
> Subject: Re: [greenstone-users] Help!!
>
> Hi again,
>
> Before reading the previous message I sent, can you wait a few minutes.
> Another developer here is trying to modify gli.bat in such a way that he
> hopes you will not encounter the "Access is denied" message again. Once
> he has adjusted the gli.bat file, I'll send it to you. Can you then run
> that and see whether it solves your problem at all? He's still testing
> out the changes at the moment.
>
> If it does not solve your problem, then would you look at the previous
> email I just sent you.
> Thanks,
> Anupama
>
> Ron Vave wrote:
>
>>
>>
>>
>>
>>
>>
>> ----------------------------------------
>>
>> Ron Vave
>>
>> Environment unit
>>
>> Institute of Applied Science
>>
>> Faculty of Science & Technology,
>>
>> University of the South Pacific,
>>
>> Suva, Fiji.
>>
>>
>>
>> Office: 3232-977
>>
>> Fax: : 3231-534
>>
>> ----------------------------------------
>>
>>
>>
>>
>>
>> -----Original Message-----
>> From: Anupama of Greenstone Team [mailto:greenstone_team@cs.waikato.ac.nz]
>> Sent: 21 November 2008 14:16
>> To: vave_r@usp.ac.fj
>> Subject: Re: [greenstone-users] Help!!
>>
>>
>>
>> Hello again Ron,
>>
>>
>>
>> Thank you for sending the output so promptly.
>>
>>
>>
>> It turns out there are two more files I can identify where the first
>>
>> occurrence of the
>>
>> @echo off
>>
>> statement needs to be replaced by
>>
>> :: @echo off
>>
>>
>>
>> Can you make the above change in the following two files as well:
>>
>> 1. C:Program FilesGreenstone2gligsdlver.bat
>>
>> 2. C:Program FilesGreenstone2glichkinst.bat
>>
>>
>>
>> And can you once again run the program and send us the output as you did
>>
>> before? I'm sorry to trouble you again with this, but it is harder for
>>
>> us to identify the problem unless all the output is visible.
>>
>>
>>
>> Thanks for your efforts,
>>
>> Anupama
>>
>>
>>
>> Ron Vave wrote:
>>
>> >
>>
>> >
>>
>> >
>>
>> >
>>
>> >
>>
>> >
>>
>> > ----------------------------------------
>>
>> >
>>
>> > Ron Vave
>>
>> >
>>
>> > Environment unit
>>
>> >
>>
>> > Institute of Applied Science
>>
>> >
>>
>> > Faculty of Science & Technology,
>>
>> >
>>
>> > University of the South Pacific,
>>
>> >
>>
>> > Suva, Fiji.
>>
>> >
>>
>> >
>>
>> >
>>
>> > Office: 3232-977
>>
>> >
>>
>> > Fax: : 3231-534
>>
>> >
>>
>> > ----------------------------------------
>>
>> >
>>
>> >
>>
>> >
>>
>> >
>>
>> >
>>
>> > -----Original Message-----
>>
>> > From: Anupama of Greenstone Team
>> [mailto:greenstone_team@cs.waikato.ac.nz]
>>
>> > Sent: 21 November 2008 13:15
>>
>> > To: vave_r@usp.ac.fj
>>
>> > Subject: Re: [greenstone-users] Help!!
>>
>> >
>>
>> >
>>
>> >
>>
>> > Hello Ron,
>>
>> >
>>
>> >
>>
>> >
>>
>> > I'm sorry I didn't explain it very well. GSDLHOME is a placeholder for
>>
>> >
>>
>> > the full directory path to your Greenstone2 installation folder. In
>>
> your
>
>> >
>>
>> > case, from the image you sent me, 'GSDLHOME' would be C:Program
>>
>> >
>>
>> > FilesGreenstone2
>>
>> >
>>
>> >
>>
>> >
>>
>> > Therefore, can you
>>
>> >
>>
>> > 1. Open the file C:Program FilesGreenstone2gligli.bat and change
>>
> the
>
>> >
>>
>> > first line, which is
>>
>> >
>>
>> > @echo off
>>
>> >
>>
>> > into
>>
>> >
>>
>> > :: @echo off
>>
>> >
>>
>> >
>>
>> >
>>
>> > 2. Open the file C:Program FilesGreenstone2setup.bat and change the
>>
>> >
>>
>> > first line, which is
>>
>> >
>>
>> > @echo off
>>
>> >
>>
>> > into
>>
>> >
>>
>> > :: @echo off
>>
>> >
>>
>> >
>>
>> >
>>
>> > 3. Run gli.bat again, and send us the output that appears in your DOS
>>
>> >
>>
>> > prompt/command console?
>>
>> >
>>
>> >
>>
>> >
>>
>> > Thanks,
>>
>> >
>>
>> > Anupama
>>
>> >
>>
>>
>
>
>


-------------- next part --------------
@echo off
set GLILANG=en

set VERTBAR="|"

:: -------- Run the Greenstone Librarian Interface --------

:: This script must be run from within the directory in which it lives
if exist gli.bat goto start
if "%GLILANG%" == "en" echo This script must be run from the directory in which it resides.
if "%GLILANG%" == "es" echo Este gui□n deber□ ejecutarse desde el directorio en el que reside.
if "%GLILANG%" == "fr" echo Ce script doit □tre ex□cut□ □ partir du r□pertoire dans lequel il se trouve.
if "%GLILANG%" == "ru" echo □□□□ □□□□ □□□□□□ □□□□ □□□□ □□ □□□□□□, □ □□□□□ □□ □□□□□□□□
goto exit

:start
if "%OS%" == "Windows_NT" goto progName
:: Invoke a new command processor to ensure there's enough environment space
if "%1" == "Second" goto progName
command /E:2048 /C %0 Second %1 %2 %3 %4 %5 %6 %7 %8 %9
goto done


:progName
if not "%PROGNAME%" == "" goto findGSDL
:: otherwise PROGNAME was not set, so default to the Greenstone Librarian Interface (GLI) program
if "%GLILANG%" == "es" set PROGNAME=Biblioteca Digital Greenstone
if "%GLILANG%" == "fr" set PROGNAME=Biblioth□caire Greenstone
if "%GLILANG%" == "ru" set PROGNAME=□□□□□□□□□ Greenstone
:: if the PROGNAME is still not set, then set the language to English
if "%PROGNAME%" == "" set PROGNAME=Greenstone Librarian Interface


if "%PROGABBR%" == "" set PROGABBR=GLI
if "%PROGNAME_EN%" == "" set PROGNAME_EN=Greenstone Librarian Interface

:findGSDL
echo.
if "%GLILANG%" == "en" echo %PROGNAME% (%PROGABBR%)
if "%GLILANG%" == "en" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
if "%GLILANG%" == "en" echo %PROGABBR% comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
if "%GLILANG%" == "en" echo This is free software, and you are welcome to redistribute it

if "%GLILANG%" == "es" echo Interfaz de la %PROGNAME% (%PROGNAME_EN% - %PROGABBR%)
if "%GLILANG%" == "es" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
if "%GLILANG%" == "es" echo La Interfaz de la %PROGNAME% NO INCLUYE ABSOLUTAMENTE NINGUNA GARANT□A.
if "%GLILANG%" == "es" echo Para mayor informaci□n vea los t□rminos de la licencia en LICENSE.txt
if "%GLILANG%" == "es" echo Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita

if "%GLILANG%" == "fr" echo Interface du %PROGNAME% (%PROGNAME_EN% - %PROGABBR%)
if "%GLILANG%" == "fr" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
if "%GLILANG%" == "fr" echo %PROGABBR% est fourni sans AUCUNE GARANTIE; pour des d□tails, voir LICENSE.txt
if "%GLILANG%" == "fr" echo Ceci est un logiciel libre, et vous □tes invit□ □ le redistribuer

if "%GLILANG%" == "ru" echo □□□□□□□□□□□□ □□□□□□□ %PROGNAME% (%PROGNAME_EN% - %PROGABBR%)
if "%GLILANG%" == "ru" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
if "%GLILANG%" == "ru" echo □□□ □□ □□□□ □□□□□□□□□ □□□□□□□ □□□□□□□□; □□□□ □□. □ □□□□ LICENSE.TXT
if "%GLILANG%" == "ru" echo □□□ - □□□□□□ □□□□□□□□□□□□ □□□□□□□ □□□□□□□ □ □□ □□□□□□ □□□□□□□□□□□□ □□□

echo.
:: ---- Determine path to Greenstone home for GS2 and GS3 ----
set GSDLPATH=
:: Some users may set the above line manually, or it may be set as an argument

set _VERSION=
if not "%GSDLPATH%" == "" goto getVer
:: Otherwise gsdlpath is not yet set
:: Check the env vars first
if not "%GSDL3SRCHOME%" == "" goto ver3
if not "%GSDLHOME%" == "" goto ver2
:: If not set, the default location for the GLI is a subdirectory of Greenstone
set GSDLPATH=..
goto getVer

:getVer
call gsdlver.bat %GSDLPATH% %_VERSION% > nul
if "%_VERSION%" == "1" goto exit
::if we are running GS2, free up any pre-set GS3 environment variables since we won't need them
if "%_VERSION%" == "2" set GSDL3SRCHOME=
if "%_VERSION%" == "2" set GSDL3HOME=
goto testGSDL


:ver3
set _VERSION=3
set GSDLPATH=%GSDL3SRCHOME%
:: if GS2 is now also set, then both GS3 and GS2 are set:
:: warn the user that we have defaulted to GS3
if not "%GSDLHOME%" == "" echo Both Greenstone 2 and Greenstone 3 environments are set.
if not "%GSDLHOME%" == "" echo It is assumed you want to run Greenstone 3.
if not "%GSDLHOME%" == "" echo If you want to run Greenstone 2, please unset the
if not "%GSDLHOME%" == "" echo environment variable GSDL3SRCHOME before running GLI.
if not "%GSDLHOME%" == "" echo.
goto testGSDL


:ver2
set _VERSION=2
set GSDLPATH=%GSDLHOME%
::free up the GS3 environment variables since we are running GS2 and don't need them
set GSDL3SRCHOME=
set GSDL3HOME=
goto testGSDL


:testGSDL
set CHECK=1
call chkinst.bat "%GSDLPATH%" %_VERSION% %GLILANG% %CHECK% > nul
if "%CHECK%" == "1" goto exit
:: otherwise installation worked well
goto prepGSDL


:prepGSDL
:: Greenstone 3 case
if "%_VERSION%" == "3" goto prepGS3

if not "%_VERSION%" == "2" echo "Greenstone version unknown"
if not "%_VERSION%" == "2" goto :exit

:: Otherwise, we are dealing with Greenstone 2
:: Setup Greenstone 2, unless it has already been done
if not "%GSDLHOME%" == "" goto doneGSDL
call "%GSDLPATH%setup.bat" SetEnv > nul
goto doneGSDL


:prepGS3
set GSDL2PATH=
: Some users may set the above line manually

if "%GSDL3SRCHOME%" == "" goto setup3
if "%GSDL3HOME%" == "" goto setup3
::otherwise
goto gs2build


:setup3
:: Setup Greenstone 3, unless it has already been done
for /F %%T in ('cd') do set GLIDIR=%%T
cd "%GSDLPATH%"
call gs3-setup.bat SetEnv > nul
cd %GLIDIR%
goto gs2build


:gs2build
:: If Greenstone version 3 is running, we want to set gsdl2path
:: Determine GSDLHOME for GS3
if not "%GSDL2PATH%" == "" goto setupGS2
:: GSDL2PATH is not yet set.
:: And if GSDLHOME is not set either, then assume
:: that the gs2build subdir of GS3 exists
if "%GSDLHOME%" == "" set GSDL2PATH=%GSDL3SRCHOME%gs2build
if "%GSDLHOME%" == "" goto setupGS2
:: Otherwise GSDLHOME is set, so set GSDL2PATH to GSDLHOME
echo GSDLHOME environment variable is set to %GSDLHOME%.
echo Will use this to find build scripts.
set GSDL2PATH=%GSDLHOME%

:setupGS2
set CHECK=1
call chkinst.bat "%GSDL2PATH%" 2 %GLILANG% %CHECK% > nul
if "%CHECK%" == "1" goto exit
:: otherwise installation worked well
:: Setup Greenstone, unless it has already been done
if "%GSDLHOME%" == "" call "%GSDL2PATH%setup.bat" SetEnv > nul
:: Either way, we can now dispose of GSDL2PATH
set GSDL2PATH=
goto doneGSDL


:doneGSDL
:: GSDLPATH is no longer needed, since GSDLHOME should now be set
set GSDLPATH=


:findPerl
:: ---- Check Perl exists ----
set PERLPATH=

:: Some users may set the above line manually - If you do this, you need to
:: make sure that perl is in your path otherwise lucene collections may not
:: work
if not "%PERLPATH%" == "" goto testPerl

:: Check if Perl is on the search path
for /F %%T in ('echo %PATH% %VERTBAR% winutilwhich.exe perl.exe') do set PERLPATH=%%T
if not "%PERLPATH%" == "" goto testPerl

:: If not, try GSDLHOMEbinwindowsperlbin
if exist "%GSDLHOME%binwindowsperlbinperl.exe" goto gsdlPerl

:: Still haven't found anything, so try looking in the registry (gulp!)
type nul > %TMP%perl.reg
regedit /E %TMP%perl.reg "HKEY_LOCAL_MACHINESOFTWAREPerl"
type %TMP%perl.reg > %TMP%perl.txt
del %TMP%perl.reg

winutilfindperl.exe %TMP%perl.txt | winutilsetvar.exe PERLPATH > %TMP%setperl.bat
del %TMP%perl.txt
call %TMP%setperl.bat
del %TMP%setperl.bat

:: If nothing was found in the registry, we're stuck
if "%PERLPATH%" == "" goto noPerl

:: if have found perl in registry, but not in path, then we need to
:: add it to path for lucene stuff.
if "%OS%" == "Windows_NT" set PATH=%PATH%;%PERLPATH%
if "%OS%" == "" set PATH="%PATH%";"%PERLPATH%"
goto testPerl

:gsdlPerl
set PERLPATH=%GSDLHOME%binwindowsperlbin

:testPerl
:: Check that a Perl executable has been found
if not exist "%PERLPATH%perl.exe" goto noPerl
echo PERL:
echo %PERLPATH%
echo.

goto findJava

:noPerl
echo.
if "%GLILANG%" == "en" echo The Greenstone Librarian Interface requires Perl in order to operate,
if "%GLILANG%" == "en" echo but Perl could not be detected on your system. Please ensure that Perl
if "%GLILANG%" == "en" echo is installed and is on your search path, then try again.

if "%GLILANG%" == "es" echo La Interfaz de la Biblioteca Digital Greenstone requiere Perl para poder
if "%GLILANG%" == "es" echo operar, pero □ste no aparece en su sistema. Por favor aseg□rese de
if "%GLILANG%" == "es" echo que Perl est□ instalado y se encuentra en su ruta de b□squeda.
if "%GLILANG%" == "es" echo A continuaci□n ejecute nuevamente este gui□n.

if "%GLILANG%" == "fr" echo Greenstone Librarian Interface n□cessite perl pour son fonctionnement,
if "%GLILANG%" == "fr" echo mais perl n'a pas pu □tre d□tect□ dans votre syst□me. Veuillez vous
if "%GLILANG%" == "fr" echo assurer que perl est install□ et est sp□cifi□ dans votre chemin de
if "%GLILANG%" == "fr" echo recherche, puis red□marrez ce script.

if "%GLILANG%" == "ru" echo □□□□□□□□□□□□ □□□□□□□ Greenstone □□□□□ Perl, □□□ □□□□□ □□□□□□□□□□□
if "%GLILANG%" == "ru" echo □□□□□□, □□ Perl □□ □□□ □ □□□ □□□□□. □□□□□□□□□□, □□□□□□□,
if "%GLILANG%" == "ru" echo □□□ Perl □□□□□□□□ □ □□□□□□□ □□ □□□ □□□□ □□□□, □□□
if "%GLILANG%" == "ru" echo □□□□□□□□□□□□□ □□□□ □□□□.
goto exit


:findJava
if "%_VERSION%" == "2" (
set SEARCH4J_EXECUTABLE=%GSDLHOME%binwindowssearch4j.exe
set HINT=%GSDLHOME%packagesjre
)
if "%_VERSION%" == "3" (
set SEARCH4J_EXECUTABLE=%GSDL3SRCHOME%binsearch4j.exe
set HINT=%GSDL3SRCHOME%packagesjre
)

for /F %%T in ('"%SEARCH4J_EXECUTABLE%" -e -m "1.4.0_00" -p "%HINT%"') do set JAVA_EXECUTABLE=%%T
if "%JAVA_EXECUTABLE%" == "" goto noJava
echo Java:
echo %JAVA_EXECUTABLE%
echo.

goto checkGLI

:noJava
echo.
if "%GLILANG%" == "en" echo Failed to locate an appropriate version of Java. You must install a
if "%GLILANG%" == "en" echo Java Runtime Environment (version 1.4 or greater) before running the
if "%GLILANG%" == "en" echo Greenstone Librarian Interface.

if "%GLILANG%" == "es" echo No se pudo localizar una versi□n apropiada de Java. Usted deber
if "%GLILANG%" == "es" echo instalar un Ambiente de Ejecuci□n Java (versi□n 1.4 o superior)
if "%GLILANG%" == "es" echo antes de correr la Interfaz de la Biblioteca Digital Greenstone.

if "%GLILANG%" == "fr" echo Une version ad?quate de Java n'a pas pu ?tre localis?e. Vous devez
if "%GLILANG%" == "fr" echo installer un Java Runtime Environment (version 1.4 ou sup?rieur)
if "%GLILANG%" == "fr" echo avant de d?marrer Greenstone Librarian Interface.

if "%GLILANG%" == "ru" echo □□ □□ □□□□ □□□□□□□□ □□□□ □□□□□□ □□□□□□□□□ □□□□ Java.
if "%GLILANG%" == "ru" echo ?□ □□□□□□ □□□ □□□□□□ Java Runtime Environment (□□□□□□ 1.4 □□□ □□□□) □□□ □□□□□□
if "%GLILANG%" == "ru" echo □□□□□□□□□□□ □□□□□□□ Greenstone.
goto exit

:checkGLI
:: ---- Check that the GLI has been compiled ----
if exist "classes/org/greenstone/gatherer/Gatherer.class" goto runGLI
if exist "GLI.jar" goto runGLI
echo.
if "%GLILANG%" == "en" echo You need to compile the Greenstone Librarian Interface (using makegli.bat)
if "%GLILANG%" == "en" echo before running this script.

if "%GLILANG%" == "es" echo Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone
if "%GLILANG%" == "es" echo (por medio de makegli.bat) antes de ejecutar este gui□n.

if "%GLILANG%" == "fr" echo Vous devez compiler le Greenstone Interface (en utilisant makegli.bat)
if "%GLILANG%" == "fr" echo avant d'ex□cuter ce script.

if "%GLILANG%" == "ru" echo □□ □□□□□□ □□□□□□□□□□□ □□□□□□□□□□□□ □□□□□□□ Greenstone (□□□□□□□ makegli.bat)
if "%GLILANG%" == "ru" echo □□□ □□□□□□ □□□ □□□□□
goto exit


:runGLI

if not "%_VERSION%" == "" (
echo Greenstone Major Version:
echo %_VERSION%
echo.
)

if not "%GSDL3SRCHOME%" == "" (
echo GSDL3SRCHOME:
echo %GSDL3SRCHOME%
echo.
)

if not "%GSDL3HOME%" == "" (
echo GSDL3HOME:
echo %GSDL3HOME%
echo.
)

if not "%GSDLHOME%" == "" (
echo GSDLHOME:
echo %GSDLHOME%
echo.
)

:: ---- Explain how to bypass Imagemagick and Ghostscript bundled with Greenstone if needed ----
echo.
if exist "%GSDLHOME%binwindowsghostscriptbin*.*" echo GhostScript bundled with Greenstone will be used, if you wish to use the version installed on your system (if any) please go to %GSDLHOME%binwindows and rename the folder called ghostscript to something else.
echo.
echo.
if exist "%GSDLHOME%binwindowsimagemagick*.*" echo ImageMagick bundled with Greenstone will be used, if you wish to use the version installed on your system (if any) please go to %GSDLHOME%binwindows and rename the folder called imagemagick to something else.
echo.
echo.


:: ---- Finally, run the GLI ----
if "%GLILANG%" == "en" echo Running the %PROGNAME%...
if "%GLILANG%" == "es" echo Ejecutando la %PROGNAME%...
if "%GLILANG%" == "fr" echo Ex□cution de %PROGNAME%
if "%GLILANG%" == "ru" echo □□□□□ □□□□□ %PROGNAME%...

:: -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


:: Run GS3 if version = 3
if "%_VERSION%" == "3" "%JAVA_EXECUTABLE%" -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -gsdl3 %GSDL3HOME% -gsdl3src %GSDL3SRCHOME% -perl %PERLPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9
if "%_VERSION%" == "3" goto finRun

:: Run GS2 since version is 2:
:: if FLI is running, we don't want the local Greenstone library server running
if "%PROGABBR%" == "FLI" goto webLib
:: Else we're running GLI, so we want the local Greenstone library server (if server.exe exists, otherwise it will be webLib)
if exist "%GSDLHOME%server.exe" goto localLib

:webLib
"%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -perl %PERLPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9
if ERRORLEVEL 2 if not "%localLibFailed%" == "true" (
echo webLib failed, going to localLib
set webLibFailed=true
goto localLib
)
goto finRun

:localLib
"%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -perl %PERLPATH% -local_library %GSDLHOME%server.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
if ERRORLEVEL 2 if not "%webLibFailed%" == "true" (
echo localLib failed, going to webLib
set localLibFailed=true
goto webLib
)
goto finRun


:finRun
if "%GLILANG%" == "en" echo Done!
if "%GLILANG%" == "es" echo □Hecho!
if "%GLILANG%" == "fr" echo Termin□!
if "%GLILANG%" == "ru" echo □□□□□□□!
goto done


:exit
echo.
pause

:done
:: ---- Clean up ----
set PERLPATH=
set JAVA_EXECUTABLE=