Create a
Run/Debug configuration
for your Main class (the easiest way is to right-click on it and choose Save 'MyClass.main()').Now, find your configuration (named after your class) on the main toolbar dropdown and choose Edit Configurations
For
VM options
, put-Duser.dir=whatever
Alternatively, setting Working directory
might be able to help you.