首先,我是WLS的新手。我从昨天起就一直在寻找这个问题,但找不到解决办法。我收到了这个错误:
C:\Oracle\MIDDLE~1\JDK160~1\bin\java -client -Xms512m -Xmx1024m -XX:CompileThreshold=8000 -XX:PermSize=512m -XX:MaxPermSize=1024m -Dweblogic.Name=DefaultServer - ....
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
我在setDomainEnv.cmd(我在Windows 7 64位上)设置了JVM选项,如下所示:
@REM IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS values
set USER_MEM_ARGS=-Xms512m -Xmx1024m -XX:CompileThreshold=8000 -XX:PermSize=512m -XX:MaxPermSize=1024m
if NOT "%USER_MEM_ARGS%"=="" (
set MEM_ARGS=%USER_MEM_ARGS%
)
I also changed these values:
set XMS_SUN_64BIT=512
set XMS_SUN_32BIT=512
set XMX_SUN_64BIT=1024
set XMX_SUN_32BIT=1024
set XMS_JROCKIT_64BIT=512
set XMS_JROCKIT_32BIT=512
set XMX_JROCKIT_64BIT=1024
set XMX_JROCKIT_32BIT=1024
if "%JAVA_VENDOR%"=="Sun" (
set WLS_MEM_ARGS_64BIT=-Xms512m -Xmx1024m
set WLS_MEM_ARGS_32BIT=-Xms512m -Xmx1024m
) else (
set WLS_MEM_ARGS_64BIT=-Xms512m -Xmx1024m
set WLS_MEM_ARGS_32BIT=-Xms512m -Xmx1024m
)
if "%JAVA_VENDOR%"=="Oracle" (
set CUSTOM_MEM_ARGS_64BIT=-Xms%XMS_JROCKIT_64BIT%m -Xmx%XMX_JROCKIT_64BIT%m
set CUSTOM_MEM_ARGS_32BIT=-Xms%XMS_JROCKIT_32BIT%m -Xmx%XMX_JROCKIT_32BIT%m
) else (
set CUSTOM_MEM_ARGS_64BIT=-Xms%XMS_SUN_64BIT%m -Xmx%XMX_SUN_64BIT%m
set CUSTOM_MEM_ARGS_32BIT=-Xms%XMS_SUN_32BIT%m -Xmx%XMX_SUN_32BIT%m
)
但他们没有改变结果。上述配置有什么问题?
答案 0 :(得分:1)
问题是MAVEN_OPTS环境变量。它是: MAVEN_OPTS = -Xmx512m -XX:MaxPermSize = 1024m 我改成了: -Xms512m -Xmx1024m --XX:PermSize = 512m -XX:MaxPermSize = 1024m