方法一、找到eclipse路徑下的eclipse.ini,加入蓝色字部分
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
128M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
128m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-XX:PermSize=256M
-XX:MaxPermSize=512M
方法二、tomcat目錄下的bin/catalina.sh(网上资料,自己试了无效)
# ----- Execute The Requested Command -----------------------------------------
# Bugzilla 37848: only output this if we have a TTY
if [ $have_tty -eq 1 ]; then
JAVA_OPTS="-server -Xms512m -Xmx512m -XX:PermSize=128M -XX:MaxNewSize=256m-XX:MaxPermSize=512m"
echo "Using CATALINA_BASE: $CATALINA_BASE"
echo"Using CATALINA_HOME: $CATALINA_HOME"
echo"Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
if ["$1" = "debug" -o "$1" = "javac" ] ;then
echo "Using JAVA_HOME: $JAVA_HOME"
else
echo"Using JRE_HOME: $JRE_HOME"
fi