How to change the value of ${user} variable used in Eclipse templates

前端 未结 10 2179
遇见更好的自我
遇见更好的自我 2020-12-02 03:58

Instead of hardcoding the default @author template I would like Eclipse to use user\'s real name taken from account information (in Linux - but Windows solution is also welc

10条回答
  •  时光说笑
    2020-12-02 04:32

    It seems that your best bet is to redefine the java user.name variable either at your command line, or using the eclipse.ini file in your eclipse install root directory.

    This seems to work fine for me:

    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    256M
    -vmargs
    -Dosgi.requiredJavaVersion=1.5
    -Duser.name=Davide Inglima
    -Xms40m
    -Xmx512m    
    

    Update:

    http://morlhon.net/blog/2005/09/07/eclipse-username/ is a dead link...

    Here's a new one: https://web.archive.org/web/20111225025454/http://morlhon.net:80/blog/2005/09/07/eclipse-username/

提交回复
热议问题