Latest Entries »

Sunday, May 24, 2009

How To Set Java Heap Size In Tomcat

Stop Tomcat server, set environment variable CATALINA_OPTS, and then restart Tomcat.

set CATALINA_OPTS="-Xms512m -Xmx512m" (Windows)
export CATALINA_OPTS="-Xms512m -Xmx512m" (ksh/bash)
setenv CATALINA_OPTS "-Xms512m -Xmx512m" (tcsh/csh)









In catalina.bat or catallina.sh, you may have noticed CATALINA_OPTS, JAVA_OPTS, or both can be used to specify Tomcat JVM options. What is the difference between CATALINA_OPTS and JAVA_OPTS? The name CATALINA_OPTS is specific for Tomcat servlet container, whereas JAVA_OPTS may be used by other java applications (e.g., JBoss). Since environment variables are shared by all applications, we don't want Tomcat to inadvertently pick up the JVM options intended for other apps. I prefer to use CATALINA_OPTS.

Thursday, May 14, 2009

Change the NetBeans Default JDK

While installation netbeans uses default JDK, to change the default JDK all you need to do is
Find NetBean’s etc/netbeans.conf file and provide the new JDK path like









# Default location of JDK, can be overridden by using –jdkhome:
netbeans_jdkhome=”C:\Program Files\Java\jdk1.6.0_05″