如何在Windows中为Tomcat设置JAVA_OPTS? [英] how to set JAVA_OPTS for Tomcat in Windows?
本文介绍了如何在Windows中为Tomcat设置JAVA_OPTS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在Windows计算机上为Tomcat设置JAVA_OPTS
,但是如果我添加多个变量,我会不断收到错误消息.
I'm trying to set JAVA_OPTS
for Tomcat on a Windows machine, but I keep getting an error if I add more than one variable.
例如,这有效:
set JAVA_OPTS="-Xms512M"
但这不是:
set JAVA_OPTS="-Xms512M -Xmx1024M"
它导致错误:
Invalid initial heap size: -Xms512M -Xmx1024M
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
就好像我可以设置一个变量(-Xmx也可以)但不能设置多个.
It's as if I can set one variable (-Xmx will also work) but not several.
我正在使用说明的setenv.bat
文件,而我的Tomcat是7.0.35.
I'm using the instructed setenv.bat
file and my Tomcat is 7.0.35.
推荐答案
显然正确的形式是没有""
Apparently the correct form is without the ""
如
set JAVA_OPTS=-Xms512M -Xmx1024M
这篇关于如何在Windows中为Tomcat设置JAVA_OPTS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文