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?
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?
-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.
-D is to add system property.
like
-Denv=test/live
so env will be test or live.