some time you need to change the author name of the files you create by eclipse rather than the system user name.
to do so:
1- open eclipse.ini file in the eclipse directory.
2- add the following line after -vmargs line
-Duser.name=your name
References:
http://dev.eclipse.org/newslists/news.eclipse.newcomer/msg07148.html
worked beautifully – thanks!
Hello Peter,
nice to see you here and thanks for comment.
Works successfully……. thanks dude,nice trickk..
i’m glad to hear that. nice to see you here Girish.
You can also change it from here:
Preferences -> Java -> Code Style -> Code Templates -> Comments
Edit the Comment: Types and change $(user) to your desired author_name.
I.e.:
@author $(user) -> @author new_author_name
thanks 🙂
thanks
Thanks dear….
Worked !, Thanks
thanks Giorgos for your enhancement
Thank you very much! Now I don’t need to modify the default name “user” every time!
You are welcome
thanks you for the help
nice short solution, thx.
Nice.. Works wonderful
I am editing @author $(user) to @author sam. But this is not working for me.What should i do.
Worked perfectly.
Thanks,
Subbu
welcome
Thanks!
author name does not show up in newly created files, how to make it added as comments while creating the file, is thre any other setting to be done, may be enable it somewhere
Hello Prem,
you can make your eclipse to add a comment with author name in all your new class by doing the following:
– open window menu
– choose preferences
– from the tree on the left choose “Java -> Code Style -> Code Templates”
– under “configure generated code and comments” choose “comments”
– choose “types” from the comments tree
– then under the “pattern” text area write the following:
/**
* @author ${user}
*
* ${tags}
*/
don’t forget to check the check box “automatically add comments for new methods and types”.
i wish you find this reply is useful.
best regards,
Mostafa
Hi Mostafa!
This was exactly what I was searching for. Thanks for this hint!
~Karsten
Oh god, thanks! 😀
Thaaaaaaaaaaaaanks ^^
Thanks. This tip is very useful.
great it works.
sam, try editing Comments -> Types as well.
thanks! works fine for new classes. for simplified adding the author in existing classes create/edit the template named “@author” under preferences > Java > Editor > Templates. set pattern from “@author ${user}” to “@author [your_name]”. set context to “Javadoc” and check “Automatically insert”.
Thanks 😉
Great and deep explanations, thans evreyone.
Here is a short summary of the topic I wrote for me.
Thank you a lot!
Still working, thanks 🙂
Thanks a lot!!!
Thanks for sharing this simple, yet useful information!
thnks 🙂
Thank you! Now I know, that It is very simple to do. But without your advice it was impossible))
thanks
it works… thanks a lot
Welcome, it is my pleasure that this post helps
thanks!!
I don’t even know the way I stopped up here, however I thought this post was great. I do not recognize who you’re but
certainly you are going to a famous blogger if you happen to are not
already. Cheers!
pest control pest control pest control