Javadoc: Setting the @author Name in Eclipse

If Eclipse isn’t generating Javadocs that have the @author name you want displayed, this should help.

Mac OS

  1. Navigate to the Applications > eclipse folder.
  2. Right click on the eclipse application launcher and choose the Show Package Contents option.
  3. Navigate to the Contents > Eclipse folder and open the eclipse.ini file in the editor of your choice.
  4. In the eclipse.ini file, find -vmargs and add the line underneath it, where atebitbyte is the name you want displayed (e.g., @author atebitbyte) when you generate Javadoc comments.
  5. Save the file, reopen Eclipse, and any future comments should have the new author name.

Modifying Comment Templates

Another way to modify the comment templates is to open the Eclipse > Preferences… menu and go to Java > Code Style > Code Templates. You can write and export your own custom templates, or import a template you made previously.

Spread the love...

Leave a Reply