Modify author name in Eclipse

Write Java classes in Eclipse, enter "/**" before the class definition, and automatic comments can be generated, including an author

/**
 * 
 * @author root
 * 
 */

I am logged in as root, so the author is root.

How to modify it?

You can find eclipse.ini in the Eclipse software directory which contains the parameters for Eclipse startup. add a new line

-Duser.name=Your name

There can be spaces in the name, but it cannot be enclosed in quotation marks, otherwise even the quotation marks will be displayed.


Also, if you want to edit the comment content. Perfecteneces that can open Eclipse

Select Java -> Code Sytle -> Code Templates in the left column. Then select Comments -> Types on the right, and then click the Edit button to edit the changes.


{{o.name}}
{{m.name}}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324143381&siteId=291194637