weblogic 调节内存

1)commEnv.cmd修改文件为:

:oracle
if "%PRODUCTION_MODE%" == "true" goto oracle_prod_mode
set JAVA_VM=-jrockit

@rem set MEM_ARGS=-Xms128m -Xmx256m
set MEM_ARGS=-Xms512m -Xmx1024m -XX:MaxPermSize=256m


set JAVA_OPTIONS=%JAVA_OPTIONS% -Xverify:none
goto continue
:oracle_prod_mode
set JAVA_VM=-jrockit
@rem set MEM_ARGS=-Xms128m -Xmx256m
set MEM_ARGS=-Xms512m -Xmx1024m -XX:MaxPermSize=256m


goto continue


:sun
if "%PRODUCTION_MODE%" == "true" goto sun_prod_mode
set JAVA_VM=-client
@rem set MEM_ARGS=-Xms32m -Xmx200m -XX:MaxPermSize=128m -XX:+UseSpinning
set MEM_ARGS=-Xms512m -Xmx1024m -XX:MaxPermSize=256m -XX:+UseSpinning

set JAVA_OPTIONS=%JAVA_OPTIONS% -Xverify:none
goto continue
:sun_prod_mode
set JAVA_VM=-server
@rem set MEM_ARGS=-Xms32m -Xmx200m -XX:MaxPermSize=128m -XX:+UseSpinning
set MEM_ARGS=-Xms512m -Xmx1024m -XX:MaxPermSize=256m -XX:+UseSpinning

goto continue


:continue


2)bin/startWebLogic.cmd



echo *  console at http:\\hostname:port\console        *
echo ***************************************************

set MEM_ARGS=-Xms512m -Xmx1024m -XX:MaxPermSize=256m


3) setDomainEnv.cmd:

set MEM_PERM_SIZE_64BIT=-XX:PermSize=512m
set MEM_PERM_SIZE_32BIT=-XX:PermSize=512m


4)eclipse.ini:

-Xms40m
-Xmx512m
-XX:MaxPermSize=256m

 

5)commEnv.cmd修改的为:JVM的启动内存;

       startWebLogic.cmd修改的为: weblogic启动的内存。

     commEnv.cmd设置内存应该大于startWebLogic.cmd设置的内存。


6) 出现报错:

could not create the java virtual machine

Error occurred during initialization of VM

Could not reserve enough space for object heap

的解决办法:在 startWebLogic.cmd 中,添加如下:set MEM_ARGS=-Xms512m -Xmx512m -XX:MaxPermSize=256m,减小内存分配,即可启动起来。

你可能感兴趣的:(JAVA)