I am in WebSphere admin console under: Application servers > as-name > Process definition > Java Virtual Machine.
There is a field "Maximum heap size".
There is a field carrying "Generic JVM arguments", where I can add the -Xmx argument to define the max heap.
what is the difference between the two options to specify the max heap?
There is no difference. In practice, the "Maximum heap size" field is converted to the appropriate -X argument when the server launcher builds the command to launch the Java executable. The attribute on the JVM configuration panel is simply a more user-friendly way to specify that value than having to manage your own -X arguments.