2 # Copyright 2017 ZTE Corporation.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
18 RUNHOME=`cd $DIRNAME/; pwd`
19 echo @RUNHOME@ $RUNHOME
22 dwApp_msbClientConfig_msbSvrIp="127.0.0.1"
23 elif [ "$OPENPALETTE_MSB_IP" ]; then
24 dwApp_msbClientConfig_msbSvrIp=$OPENPALETTE_MSB_IP
26 dwApp_msbClientConfig_msbSvrIp=$1
29 dwApp_msbClientConfig_msbSvrPort="80"
30 elif [ "$OPENPALETTE_MSB_PORT" ]; then
31 dwApp_msbClientConfig_msbSvrPort=$OPENPALETTE_MSB_PORT
33 dwApp_msbClientConfig_msbSvrPort=$2
35 echo " dwApp_MSB_ADDR=${dwApp_msbClientConfig_msbSvrIp}:${dwApp_msbClientConfig_msbSvrPort}"
37 if [ -f "$RUNHOME/setenv.sh" ]; then
38 . "$RUNHOME/setenv.sh"
40 echo "can not found $RUNHOME/setenv.sh"
43 echo ================== ENV_INFO =============================================
44 echo @RUNHOME@ $RUNHOME
45 echo @Main_Class@ $Main_Class
46 echo @APP_INFO@ $APP_INFO
47 echo @Main_JAR@ $Main_JAR
48 echo @Main_Conf@ $Main_Conf
49 echo ==========================================================================
51 echo start $APP_INFO ...
53 JAVA="$JAVA_HOME/bin/java"
54 JAVA_OPTS="-Xms50m -Xmx128m"
56 #JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$port,server=y,suspend=n"
57 CLASS_PATH="$EXT_DIRS:$RUNHOME/:$RUNHOME/$Main_JAR"
59 echo ================== RUN_INFO =============================================
60 echo @JAVA_HOME@ $JAVA_HOME
62 echo @JAVA_OPTS@ $JAVA_OPTS
63 echo @CLASS_PATH@ $CLASS_PATH
64 echo @EXT_DIRS@ $EXT_DIRS
65 echo ==========================================================================
71 "$JAVA" $JAVA_OPTS -classpath "$CLASS_PATH" $Main_Class server "$RUNHOME/$Main_Conf"