Control Java maximum Heap size in Centos 7 : <p>I need to minimize the JVM MaxHeapSize. My program keeps freezing on executing. I am using Centos 7. My JVM MaxHeapSize=2G
When applying the following command:</p>

<pre><code>java -Xmx1024m
</code></pre>

<p>I get this error:</p>

<pre><code> Usage: java [-options] class [args...]
            (to execute a class)    or  java [-options] -jar jarfile [args...]
            (to execute a jar file) where options include:
     -d32          use a 32-bit data model if available
     -d64          use a 64-bit data model if available
     -server       to select the "server" VM
                   The default VM is server,
                   because you are running on a server-class machine.
</code></pre>

<p>How to change jvm to a client, and how to avoid this error. With many thanks   </p>
