You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by ti...@t-online.de on 2002/09/11 16:06:44 UTC

Windows: startup scripts do not work with long file names

Hi!

I installed Xindice to c:\Program Files\Apache Xindice. startup.bat
won't work because the path contains a space and startup.bat does not
put paths/env vars in quotes :-( This should be fixed for the next
release...

By the way the javac string echoed did not match the command executed
(org.apache.xindice.server.Xindice contained .core.).

@echo off
rem find XINDICE_HOME
if not "%XINDICE_HOME%"=="" goto checkJava

rem check for ant in Program Files on system drive
if not exist "%SystemDrive%\Program Files\Xindice" goto
checkSystemDrive
set XINDICE_HOME=%SystemDrive%\Program Files\Xindice
goto checkJava

:checkSystemDrive
rem check for ant in root directory of system drive
if not exist "%SystemDrive%\Xindice" goto checkCurrent
set XINDICE_HOME=%SystemDrive%\Xindice
goto checkJava

:checkXindice
rem check for ant in root directory of system drive
if not exist "%SystemDrive%\Xindice" goto checkWorkXindice
set XINDICE_HOME=%SystemDrive%\Xindice
goto checkJava


:checkWorkXindice
rem check for ant in root directory of system drive
if not exist "%SystemDrive%\work\Xindice" goto checkCurrent
set XINDICE_HOME=%SystemDrive%\work\Xindice
goto checkJava

:checkCurrent
if exist ".\config" set XINDICE_HOME=.\
goto checkJava

:noHome
echo XINDICE_HOME is not set and Xindice could not be located. Please
set XINDICE_HOME.
goto end

:checkJava
if "%JAVACMD%" == "" set JAVACMD=java

set LOCALCLASSPATH=%CLASSPATH%;%ANT_HOME%\config
for %%i in ("%XINDICE_HOME%\java\lib\*.jar") do call
"%XINDICE_HOME%\bin\lcp.bat" %%i

if "%JAVA_HOME%" == "" goto runAnt
if exist %JAVA_HOME%\lib\tools.jar call %XINDICE_HOME%\bin\lcp.bat
%JAVA_HOME%\lib\tools.jar
if exist %JAVA_HOME%\lib\classes.zip call %XINDICE_HOME%\bin\lcp.bat
%JAVA_HOME%\lib\classes.zip

:runAnt
cd %XINDICE_HOME%
echo %JAVACMD% -classpath "%LOCALCLASSPATH%" -noverify
org.apache.xindice.server.Xindice "%XINDICE_HOME%\config\system.xml"
%JAVACMD% -Xms16m -Xmx128m -Dxindice.home="%XINDICE_HOME%" -classpath
"%LOCALCLASSPATH%" -noverify org.apache.xindice.server.Xindice
"%XINDICE_HOME%\config\system.xml"

:end
set LOCALCLASSPATH=