title: how to set JAVA_OPTS for Tomcat in Windows?
body: <p>I'm trying to set <code>JAVA_OPTS</code> for Tomcat on a Windows machine, but I keep getting an error if I add more than one variable.</p>
  
  <p>For example, this works:</p>
  
  <pre><code>set JAVA_OPTS="-Xms512M"
  </code></pre>
  
  <p>But this does not:</p>
  
  <pre><code>set JAVA_OPTS="-Xms512M -Xmx1024M"
  </code></pre>
  
  <p>It results in the error:</p>
  
  <pre><code>Invalid initial heap size: -Xms512M -Xmx1024M
  Error: Could not create the Java Virtual Machine.
  Error: A fatal exception has occurred. Program will exit.
  </code></pre>
  
  <p>It's as if I can set one variable (-Xmx will also work) but not several.</p>
  
  <p>I'm using the instructed <code>setenv.bat</code> file and my Tomcat is 7.0.35.</p>