Wednesday, December 10, 2008

Real @author name in java classes

When we create a new class in NetBeans the class is created using the default template for a Java class and this template uses the user name which is created as the computer user.  In my case it is tusharj.  This makes the class use my name as

@author tusharj

which is not exciting.  I want to use my real name and my email address after the @author java doc tag.

NetBeans provides a way to specify your own name to be used here.  Open the Tools Menu and choose the Templates option.

In the long list of Templates locate the User Configuration Properties Node and select its child node

Uncomment the #user line and add your name and email address.  Check the name I have written for me in the image below.

Now when we create a new Java class 

We can see the @author tag with my real name 

with regards
Tushar Joshi, Nagpur


  1. Very good article indeed. Helped a lot. Thanks!

  2. You saved me 2 hours. I owe you $100.

  3. Thanks tusharj, oops I mean Tushar Joshi ;)

    Seriously that's superb... loving your simple tutorial... thank thanks thanks :D :D

  4. Yep, thanks a lot.

    On Netbeans 7.0 you have the settings button option at the templates form. Hit the button, A file will open, then follow the process above.