From 7daebb86922e12d6ba3bcbce7498e4a959e813e4 Mon Sep 17 00:00:00 2001 From: theli Date: Wed, 18 May 2005 07:35:47 +0000 Subject: [PATCH] *) Adding dynamic java classpath generation to windows startup/shutdown scripts git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@131 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- startYACY.bat | 23 ++++++++++++++++++++++- startYACY_noconsole.bat | 23 +++++++++++++++++++++-- stopYACY.bat | 20 +++++++++++++++++++- 3 files changed, 62 insertions(+), 4 deletions(-) diff --git a/startYACY.bat b/startYACY.bat index 8c7cebfd0..05656a290 100644 --- a/startYACY.bat +++ b/startYACY.bat @@ -1 +1,22 @@ -@java -classpath classes;lib/commons-collections.jar;lib/commons-pool-1.2.jar;libx/PDFBox-0.7.1.jar;libx/log4j-1.2.9.jar;libx/tm-extractors-0.4.jar yacy +@Echo Off +If %1.==CPGEN. GoTo :CPGEN + +Rem Generating the proper classpath unsing loops and labels +Set CLASSPATH=classes +For %%X in (lib/*.jar) Do Call %0 CPGEN lib\%%X +For %%X in (libx/*.jar) Do Call %0 CPGEN libx\%%X + +Rem Starting yacy +Echo Generated Classpath:%CLASSPATH% +java -classpath %CLASSPATH% yacy + +GoTo :END + +Rem This target is used to concatenate the classpath parts +:CPGEN +Set CLASSPATH=%CLASSPATH%;%2 + +Rem Target needed to jump to the end of the file +:END + + diff --git a/startYACY_noconsole.bat b/startYACY_noconsole.bat index 9f78042c9..909c91640 100644 --- a/startYACY_noconsole.bat +++ b/startYACY_noconsole.bat @@ -1,2 +1,21 @@ -@javaw -classpath classes;lib/commons-collections.jar;lib/commons-pool-1.2.jar yacy -@echo You can close the console safely \ No newline at end of file +@Echo Off +If %1.==CPGEN. GoTo :CPGEN + +Rem Generating the proper classpath unsing loops and labels +Set CLASSPATH=classes +For %%X in (lib/*.jar) Do Call %0 CPGEN lib\%%X +For %%X in (libx/*.jar) Do Call %0 CPGEN libx\%%X + +Rem Starting yacy +Echo Generated Classpath:%CLASSPATH% +javaw -classpath %CLASSPATH% yacy +Echo You can close the console safely + +GoTo :END + +Rem This target is used to concatenate the classpath parts +:CPGEN +Set CLASSPATH=%CLASSPATH%;%2 + +Rem Target needed to jump to the end of the file +:END \ No newline at end of file diff --git a/stopYACY.bat b/stopYACY.bat index a0c58eadf..1f5f287a1 100644 --- a/stopYACY.bat +++ b/stopYACY.bat @@ -1,2 +1,20 @@ -@java -classpath classes;lib/commons-collections.jar;lib/commons-pool-1.2.jar;libx/PDFBox-0.7.1.jar;libx/log4j-1.2.9.jar;libx/tm-extractors-0.4.jar yacy -shutdown +@Echo Off +If %1.==CPGEN. GoTo :CPGEN +Rem Generating the proper classpath unsing loops and labels +Set CLASSPATH=classes +For %%X in (lib/*.jar) Do Call %0 CPGEN lib\%%X +For %%X in (libx/*.jar) Do Call %0 CPGEN libx\%%X + +Rem Starting yacy +Echo Generated Classpath:%CLASSPATH% +java -classpath %CLASSPATH% yacy -shutdown + +GoTo :END + +Rem This target is used to concatenate the classpath parts +:CPGEN +Set CLASSPATH=%CLASSPATH%;%2 + +Rem Target needed to jump to the end of the file +:END