Java memory allocation difference between DXX and XX

I'm automating a mule stack. The client wants his java binary to run with

-DXX:MaxPermSize=4096M -XX:MaxPermSize=4096m

Can someone explain the difference between DXX and XX memory allocation?

Jon Skeet
people
quotationmark

-D[...] is just a flag to set a "system property". Unless anything looks at that system property, it will have no effect at all.

For example:

System.out.println(System.getProperty("XX:MaxPermSize"));

... will print out "4096M" in your example, but would normally print out null as the property wouldn't be defined.

The second flag is a flag the JVM itself can use to affect memory allocation - although any -X flag is non-standard and subject to change without notice.

Basically, it sounds like your client may be a bit confused, and you should ask them if they have any good, solid reason for specifying a system property as well as a JVM flag.

people

See more on this question at Stackoverflow