I have a file header template which includes a @author ${USER}
. However when I create a new java class in IntelliJ, only my first name appears, probably because my system user login is just my first name. I applied the following instructions (basically adding -Duser.name=Firstname Lastname
in idea.exe.vmoptions
) in order to have both my first and last name instead, and it works. However this parameter is not only used by this template and make for example some plugins break because of the typical invoking line command:
"C:\Program Files\Java\jdk1.8.0_60\bin\java" -server -Xms128m -Xmx512m -XX:MaxPermSize=250m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow
-Duser.name=Firstname Lastname
etc...
This command complains about not finding the class Lastname
because IntelliJ adds all arguments in idea.exe.vmoptions
which include -Duser.name=Firstname Lastname
but this breaks the arguments chain because of the space in the user name...
Any idea on how to change the author name without breaking anything?