I have set up a Tomcat server using Server 2008 and IIS 7.
How can I tell if the JAVA_OPTS environment variable is actually being used?
I've heard before that the I have to edit the service.bat file in order to make the JAVA_OPTS environment variable be used, but how can I tell if it's successful?
I haven't been able to find out if there is a way to view this in the logs or something else more quantitative. The only way I could think of to try to test it is to edit the variable and try to tell if there is a difference in performance. I set the JAVA_OPTS to be the following:
-server -Xmx1k -Xms1k-Xmn1k -Xss128k -XX:+UseParallelGC -XX:ParallelGCThreads=20 -XX:PermSize=1k -XX:MaxPermSize=1k
Also, I found documentation saying to change the following line in service.bat from:
"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties" --JvmMs 128 --JvmMx 256
to:
"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties" %JAVA_OPTS%
I got no errors when I ran the command
service install ServiceName
So far everything seems to be running as fast as it always is before I reinstalled the service with the changed memory settings, making me think that the JAVA_OPTS isn't affecting anything.
Sorry if this is a broad sort of question, but I haven't found a good lead to go off of yet as to what is actually happening in the back end. Can somebody shed some light on this?