问题提出:在用IDEA编程创建一个新的文件时自动产生的user名字怎么自定义?
?
文件注释:
?
<%-- Created by IntelliJ IDEA. User: user Date: 2014/11/14 Time: 13:37 To change this template use File | Settings | File Templates. --%>
方案一:在IDEA环境中去设置,File->Settings->File and Code Templates(IDEA14)->Include->File Header:修改${USER}为自定义名字。如图:
?
?
方案二:直接进入IDEA安装目录,路径依次为JetBrains->IntelliJ IDEA 14.0->bin,用文本编辑器打开idea.exe.vmoptions(win32添加)和idea64.exe.vmoptions(win64添加),新建一行,添加-Duser.name=1250052380@qq.com
这里选择我选择在最后一行:
?
-server -Xms128m -Xmx512m -XX:MaxPermSize=250m -XX:ReservedCodeCacheSize=150m -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Djsse.enableSNIExtension=false -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -Duser.name=1250052380@qq.com
?
修改之后的效果:
HTML代码File Header注释
?
<%-- Created by IntelliJ IDEA. User: 1250052380@qq.com Date: 2014/11/14 Time: 13:37 To change this template use File | Settings | File Templates. --%>
?
Java代码File Header注释?
?
/** * Created by 1250052380@qq.com on 2014/11/14. */
?
?
?
?
原文:http://musuny.iteye.com/blog/2158897