In short, yes you need to do some tweaking. My notes (Windows Server 2008 64bit) are:
Code: Select allcatalina.bat run
Using CATALINA_BASE: "G:\xampp\tomcat"
Using CATALINA_HOME: "G:\xampp\tomcat"
Using CATALINA_TMPDIR: "G:\xampp\tomcat\temp"
Using JRE_HOME: "C:\Program Files (x86)\Java\jdk1.7.0_79\jre"
Using CLASSPATH: "G:\xampp\tomcat\bin\bootstrap.jar;G:\xampp\tomcat\bin\tomcat-juli.jar"
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
In windows, the file to edit is setenv.bat (in the bin folder). There is an equivalent bash script. On first boot the first line will look a bit like this:
set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx2048m -XX:+UseConcMarkSweepGC -Djava.awt.headless=true
Where:
-Xms size in bytes
Sets the initial size of the Java heap.
The default size is 2097152 (2MB).
The values must be a multiple of, and greater than, 1024 bytes (1KB).
(The -server flag increases the default size to 32M.)
-Xmx size in bytes
Sets the maximum size to which the Java heap can grow.
The default size is 64M.
(The -server flag increases the default size to 128M.)
The maximum heap limit is about 2 GB (2048MB).
If the Xmx is set too high then you get the could not reserve enough space error. 2G does not work for me.
The `space for object heap` error is one about memory. The default Xmx setting in the install version of setenv.bat is 2048m. This just does not work for me. Using this does:
Code: Select allset JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx1024m -XX:+UseConcMarkSweepGC -Djava.awt.headless=true
This seems to be a Java 32bit problem. If you switch to Java 64bit then this probably goes away. Later on, you are going to encounter a different memory problem (malcmail - I think this is the one you have) which means adding in support for the PermSize:
-XX:PermSize -XX:MaxPermSize are used to set size for Permanent Generation.
Permanent Generation: The Permanent Generation is where class files are kept. These are the result of compiled classes and jsp pages. If this space is full, it triggers a Full Garbage Collection. If the Full Garbage Collection cannot clean out old unreferenced classes and there is no room left to expand the Permanent Space, an Out of Memory error (OOME) is thrown and the JVM will crash.
Hence:
Code: Select allset JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx512m -XX:PermSize=512m -XX:MaxPermSize=1g -XX:+UseConcMarkSweepGC -Djava.awt.headless=true
This then interferes with the max heap size, and you will see I have had to cut that to 512m. This is the best I can get on Windows Server 2008 64bit, with 32bit Java and XAMPP. On my current 12Gb Server with 64bit Java, I am trying:
Code: Select allset JAVA_OPTS=%JAVA_OPTS% -Xms1g -Xmx2g -XX:PermSize=2g -XX:MaxPermSize=4g -XX:+UseConcMarkSweepGC -Djava.awt.headless=true
It is running for now, but needs more testing.