Java System Environment Variable
There is a special environment variable called _JAVA_OPTIONS, its value will be picked up by the JVM (java.exe).
In Windows:
set _JAVA_OPTIONS=-Xms64m -Xmx128m -Dawt.useSystemAAFontSettings=lcd
In Linux:
export _JAVA_OPTIONS='-Xms64m -Xmx128m -Dawt.useSystemAAFontSettings=lcd'
For Java Web Start it's JAVAWS_VM_ARGS. For javaw.exe (Applet), it's _JPI_VM_OPTIONS.
edit 20201213
_JAVA_OPTIONS environment variable was ok but was not documented or supported. Since it is not standardized, other vendors have their own names e.g. IBM_JAVA_OPTIONS. Leading underscore names are private by convention so it's not a good idea to standardize the usage of _JAVA_OPTIONS. That's why JAVA_TOOL_OPTIONS should be the preferred choice.
ref : https://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html#tooloptions