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.
For example, this works:
set JAVA_OPTS="-Xms512M"
But this does not:
set JAVA_OPTS="-Xms512M -Xmx1024M"
It results in the error:
Invalid initial heap size: -Xms512M -Xmx1024M Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
It's as if I can set one variable (-Xmx will also work) but not several.
I'm using the instructed setenv.bat
file and my Tomcat is 7.0.35.
The Tomcat server is run within a Java Virtual Machine (JVM). This JVM that controls the amount of memory available to LabKey Server. LabKey recommends that the Tomcat web application be configured to have a maximum Java Heap size of at least 2GB for a test server, and at least 4GB for a production server.
Open the Start Menu and choose "Run". Enter "MSCONFIG" and hit Enter to open the System Configuration utility.
Apparently the correct form is without the ""
As in
set JAVA_OPTS=-Xms512M -Xmx1024M
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With