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

前端 未结 10 2182
遇见更好的自我
遇见更好的自我 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:21

    dovescrywolf gave tip as a comment on article linked by Davide Inglima

    It was was very useful for me on MacOS.

    • Close Eclipse if it's opened.
    • Open Termnal (bash console) and do below things:

      $ pwd /Users/You/YourEclipseInstalationDirectory  
      $ cd Eclipse.app/Contents/MacOS/  
      $ echo "-Duser.name=Your Name" >> eclipse.ini  
      $ cat eclipse.ini
      
    • Close Terminal and start/open Eclipse again.

提交回复
热议问题