Friday, December 28, 2007

How to set @author or ${user} properties in Netbeans 6.0 templates

This is a simple task in Netbeans 5.5, but not obvious in Netbeans 6.0. To set the ${user} variable in templates in Netbeans 6.0, you must go to Tools --> Templates. This will bring up the Template Manager screen. Scroll to the section called User Configuration Properties and expand it. You will see a template called User.properties.


Select the User.properties and Open in Editor. Uncomment the line user and set it to the appropriate value and then save the file.


Now when you create a new Java source file, the javadoc @author will be set to the new property. This same method is used to set other properties in your templates as well.

4 comments :

Kevin J. Black said...

Thank you so much! I really appreciate this info. COuldn't find it elsewhere.

Marina Isaac said...

Fantastic, thank you so much! (I too couldn't find it anywhere else.)

Unknown said...

thanks a lot!!

KiNGPiN said...

Thx man, ppl were saying some weird things to such a simple task u explained :)

Popular Posts