This is an automated email from the ASF dual-hosted git repository.

gongchao pushed a commit to branch fix-collector-run
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git

commit 92ea0638778611a6b2ce78b2b2bff9a073366207
Author: tomsun28 <[email protected]>
AuthorDate: Sat May 18 09:49:27 2024 +0800

    [bugfix] fix collector startup error classpath
    
    Signed-off-by: tomsun28 <[email protected]>
---
 script/assembly/collector/bin/startup.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/script/assembly/collector/bin/startup.sh 
b/script/assembly/collector/bin/startup.sh
index c20213b7f..5b48adce4 100644
--- a/script/assembly/collector/bin/startup.sh
+++ b/script/assembly/collector/bin/startup.sh
@@ -99,7 +99,7 @@ echo -e "Starting the HertzBeat $SERVER_NAME ..."
 
 if [ -f "./java/bin/java" ]; then
     echo -e "Use the inner package jdk to start"
-    nohup ./java/bin/java $JAVA_OPTS $JAVA_MEM_OPTS $CONFIG_FILES $CLASSPATH 
$MAIN_CLASS >logs/startup.log 2>&1 &
+    nohup ./java/bin/java $JAVA_OPTS $JAVA_MEM_OPTS $CONFIG_FILES -cp 
$CLASSPATH $MAIN_CLASS >logs/startup.log 2>&1 &
 else
     JAVA_EXIST=`which java | grep bin | wc -l`
     if [ $JAVA_EXIST -le 0 ]; then
@@ -107,7 +107,7 @@ else
       exit 1
     fi
     echo -e "Use the system environment jdk to start"
-    nohup java $JAVA_OPTS $JAVA_MEM_OPTS $CONFIG_FILES $CLASSPATH $MAIN_CLASS 
>logs/startup.log 2>&1 &
+    nohup java $JAVA_OPTS $JAVA_MEM_OPTS $CONFIG_FILES -cp $CLASSPATH 
$MAIN_CLASS >logs/startup.log 2>&1 &
 fi
 
 COUNT=0


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to