summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--startYACY.bat23
-rw-r--r--startYACY_noconsole.bat23
-rw-r--r--stopYACY.bat20
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