set JAVA_HOME=
echo deploy web service ......
set CATALINA_HOME=%WEBTIER_HOME%
call "%CATALINA_HOME%\bin\service.bat" install %webtier%
"%CATALINA_HOME%\bin\tomcat7.exe" //US//%webtier% ++JvmOptions "-Djava.library.path=%installdir%\bin;-XX:MaxPermSize=256M;-Xms256m;-Xmx1024M"
set CATALINA_HOME=%WEBSERVICE_HOME%
call "%CATALINA_HOME%\bin\service.bat" install %webservice%
"%CATALINA_HOME%\bin\tomcat7.exe" //US//%webservice% ++JvmOptions "-Djava.library.path=%installdir%\bin;-XX:MaxPermSize=256M;-Xms256m;-Xmx1024M"
这是启动java web服务的.bat文件,但是有内存泄漏和堆错误,所以我想设置JAVA_OPTS,我可以直接添加“set JAVA_OPTS=-server -Xmx1024m”吗
set JAVA_HOME=
set JAVA_OPTS=-server -Xmx1024m
echo deploy web service ......
set CATALINA_HOME=%WEBTIER_HOME%
call "%CATALINA_HOME%\bin\service.bat" install %webtier%
"%CATALINA_HOME%\bin\tomcat7.exe" //US//%webtier% ++JvmOptions "-Djava.library.path=%installdir%\bin;-XX:MaxPermSize=256M;-Xms256m;-Xmx1024M"
set CATALINA_HOME=%WEBSERVICE_HOME%
call "%CATALINA_HOME%\bin\service.bat" install %webservice%
"%CATALINA_HOME%\bin\tomcat7.exe" //US//%webservice% ++JvmOptions "-Djava.library.path=%installdir%\bin;-XX:MaxPermSize=256M;-Xms256m;-Xmx1024M"
或在 -Djava.library.path 之后添加作为 JvmOptions 参数