About JVM invalid initial heap size


After I add file “openfired.vmoptions” which content is “-Xms512m -Xmx1024m” to openfire_home/bin dir,

the openfire can not start,

err msg is:

The JVM could not be started. The main method may have thrown an exception.

Invalid initial heap size: -Xms512m -Xmx1024m

I think my operation is following the desc in the openfire web site page.

How to resolve this problem? tks


win server 2003



I had that issue, when i changed to run openfire as a service and added


-XmS 1024

in a openfire-service.vmoptions file is worked a treat.

i kept the openfired file there too with the same data as above in there (including the -X… being on different lines)

is this a bug?

not sure… it does seem to work just has to be done in a certain way … give it a go with the sizes on different rather than the same one, as it effectivly is 2 commands one to set the minimum and one to set the maximum.

my args is -Xms512m -Xmx1024m

but it does not work.

but are on the same line it seems from the pic on the other post about this… what i mean is in the option file have it set out like this



this is how i have it in mine and it works.

At the very start,I do in your way,

but it does not work.

and just now I try again,

it does not work too,err is same.

Actually,I have try other way to use -X… args.

Rebuild the openfire src,and edit the openfire_home/bin/openfire.bat file,

as follow:


if “%1” == “-debug” goto debug

start “Openfire” “%JAVA_HOME%\bin\java” -server -DopenfireHome="%OPENFIRE_HOME%" -Xms1024m -Xmx1024m -jar …\lib\startup.jar

goto end

when I run openfire.bat ,openfire server works.

Whatever,this issue is existing issue.