The following Java startup parameters should be used (and the values adjusted) when running a Java process on a server.
-Xmx1G -Xmx4G -XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xloggc:Gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M
When a Java process starts, it overwrites an existing GC log file. I would recommend to either use a timestamp in the filename or use the %pid placeholder.
If you want to use JMX, also add the following parameters:
-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=1888 -Dcom.sun.management.jmxremote.authenticate=false