How to set system property in gradle-cuba.studio?

Yes, to setup your variables only for CUBA Studio you should use the STUDIO_OPTS variable.

All values from both variables will be loaded, but values that are defined in STUDIO_OPTS will override values defined in JAVA_OPTS

But just for interesst, in which file, or where the instance variable will be set, or where it will be loaded, in which file, STUDIO_OPTS and JAVA_OPTS will be loaded?

Thanks

They are loaded in studio/bin/studio.bat and in studio/bin/studio files for Windows and Linux operating systems respectively.