Skip to content

Commit c3caeb2

Browse files
author
Hubert Plociniczak
committed
runjava.sh and runjava.bat are able
to locate necessary jars from whatever place the scripts are called
1 parent fac0a48 commit c3caeb2

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

scripts/runjava.bat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
setlocal EnableDelayedExpansion
44

5+
set SCRIPT_DIR="%~dp0%"
56
set CP=
6-
for %%F in (*.jar) do set CP=!CP!;%%F
7+
for %%F in (*.jar !SCRIPT_DIR!/../build/lib/*.jar !SCRIPT_DIR!/../lib/*.jar) ^
8+
DO set CP=!CP!;%%F
79

810
java -cp %CP% %1 %2 %3 %4 %5 %6 %7 %8 %9
911

scripts/runjava.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/bin/sh
22
RABBIT_JARS=
3-
for d in *.jar
3+
SCRIPT_DIR=`dirname $0`
4+
for d in *.jar $SCRIPT_DIR/../build/lib/*.jar $SCIRPT_DIR/../lib/*.jar
45
do
56
RABBIT_JARS="$d:$RABBIT_JARS"
67
done
7-
exec java -cp "$RABBIT_JARS" "$@"
8+
exec java -cp "$RABBIT_JARS" "$@"

0 commit comments

Comments
 (0)