2 @REM Copyright (C) 2015 CMCC, Inc. and others. All rights reserved. (CMCC)
\r
4 @REM Licensed under the Apache License, Version 2.0 (the "License");
\r
5 @REM you may not use this file except in compliance with the License.
\r
6 @REM You may obtain a copy of the License at
\r
8 @REM http://www.apache.org/licenses/LICENSE-2.0
\r
10 @REM Unless required by applicable law or agreed to in writing, software
\r
11 @REM distributed under the License is distributed on an "AS IS" BASIS,
\r
12 @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 @REM See the License for the specific language governing permissions and
\r
14 @REM limitations under the License.
\r
20 echo ### RUNHOME: %RUNHOME%
\r
22 echo ### Starting dac-service
\r
25 rem set JAVA_HOME=D:\JDK1.7\jdk\jdk\windows
\r
26 set JAVA="%JAVA_HOME%\bin\java.exe"
\r
27 set jvm_opts=-Xms50m -Xmx128m
\r
29 if exist %JAVA_HOME%\jre\lib\i386 set jvm_opts=%jvm_opts% -Djava.library.path=%RUNHOME%conf\system\native\windows
\r
30 if not exist %JAVA_HOME%\jre\lib\i386 set jvm_opts=%jvm_opts% -Djava.library.path=%RUNHOME%conf\system\native\windows-x86-64
\r
32 rem set remote debug
\r
34 rem set jvm_opts=%jvm_opts% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=n
\r
36 for /f "delims= " %%a in ('date /t') do (set date_string=%%a)
\r
37 set date_time_string=%date_string%-%TIME%
\r
38 set date_time_string=%date_time_string::=-%
\r
39 set date_time_string=%date_time_string: =-%
\r
40 set date_time_string=%date_time_string:/=-%
\r
41 set date_time_string=%date_time_string:\=-%
\r
42 set date_time_string=%date_time_string:<=-%
\r
43 set date_time_string=%date_time_string:?=-%
\r
44 set date_time_string=%date_time_string:"=-%
\r
45 set date_time_string=%date_time_string:>=-%
\r
46 set date_time_string=%date_time_string:|=-%
\r
48 set jvm_opts=%jvm_opts% -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=%RUNHOME%logs\dump-dac-%date_time_string%.hprof
\r
50 set class_path=%RUNHOME%;%RUNHOME%dac.jar
\r
51 echo ### jvm_opts: %jvm_opts%
\r
52 echo ### class_path: %class_path%
\r
54 %JAVA% -classpath %class_path% %jvm_opts% org.onap.vfc.nfvo.emsdriver.EMSDriverApp server %RUNHOME%conf/emsdriver.yml
\r
56 IF ERRORLEVEL 1 goto showerror
\r
59 echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check!
\r
60 echo After checking, press any key to close
\r