svn commit: r368508 - in /xml/xindice/trunk/java/examples/guide: README run.bat

[email protected]
Newsgroups gmane.text.xml.xindice.devel
Message-ID <[email protected]>
Author: vgritsenko
Date: Thu Jan 12 14:58:14 2006
New Revision: 368508

URL: http://svn.apache.org/viewcvs?rev=368508&view=rev
Log:
update examples run script, readme.

Modified:
    xml/xindice/trunk/java/examples/guide/README
    xml/xindice/trunk/java/examples/guide/run.bat

Modified: xml/xindice/trunk/java/examples/guide/README
URL: http://svn.apache.org/viewcvs/xml/xindice/trunk/java/examples/guide/README?rev=368508&r1=368507&r2=368508&view=diff
==============================================================================
--- xml/xindice/trunk/java/examples/guide/README (original)
+++ xml/xindice/trunk/java/examples/guide/README Thu Jan 12 14:58:14 2006
@@ -1,8 +1,11 @@
-CVS $Id$
+SVN $Id$
 
                  --- Xindice Developer's Guide example ---
 
 This directory contains some example code used in the Xindice Developers Guide.
+
+Build:
+      Run ant in parent directory first to compile examples.
 
 Run:
       Make sure the Xindice server is running.

Modified: xml/xindice/trunk/java/examples/guide/run.bat
URL: http://svn.apache.org/viewcvs/xml/xindice/trunk/java/examples/guide/run.bat?rev=368508&r1=368507&r2=368508&view=diff
==============================================================================
--- xml/xindice/trunk/java/examples/guide/run.bat (original)
+++ xml/xindice/trunk/java/examples/guide/run.bat Thu Jan 12 14:58:14 2006
@@ -1,53 +1,30 @@
 @echo off
-rem find XINDICE_HOME
-rem 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 checkXindice
-set XINDICE_HOME=%SystemDrive%\Xindice
+set _XINDICE_HOME=%~dp0..\..\..
+if not exist %_XINDICE_HOME%\config\commands.xml goto noHome
 goto checkJava
 
-:checkXindice
-rem check for ant in root directory of system drive
-if not exist "%SystemDrive%\Xindice" goto checkXindiceWork
-set XINDICE_HOME=%SystemDrive%\Xindice
-goto checkJava
-
-
-:checkXindiceWork
-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=
-echo %XINDICE_HOME%
-goto checkJava
-
-:noAntHome
-echo XINDICE_HOME is not set and ant could not be located. Please set XINDICE_HOME.
+:noHome
+if exist %XINDICE_HOME%\config\commands.xml goto setHome
+echo XINDICE_HOME is not set and could not be located. Please set XINDICE_HOME.
 goto end
 
+:setHome
+set _XINDICE_HOME=%XINDICE_HOME%
+
 :checkJava
 if "%JAVACMD%" == "" set JAVACMD=java
 
-set LOCALCLASSPATH=%CLASSPATH%
-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
+set LOCALCLASSPATH=%_XINDICE_HOME%\build\guide-classes
+for %%i in (%_XINDICE_HOME%\java\lib\*.jar) do call %_XINDICE_HOME%\bin\lcp.bat %%i
+for %%i in (%_XINDICE_HOME%\dist\*.jar) do call %_XINDICE_HOME%\bin\lcp.bat %%i
+
+if "%JAVA_HOME%" == "" goto run
+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
-%JAVACMD% -classpath %LOCALCLASSPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9
+:run
+%JAVACMD% -cp %LOCALCLASSPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9
 
 :end
 set LOCALCLASSPATH=
-
+set _XINDICE_HOME=
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.