Instead of hardcoding the default @author template I would like Eclipse to use user's real name taken from account information (in Linux - but Windows solution is also welcome). Entering it somewhere into Eclipse configuration would be acceptable, too, alas I can't find the right place.
+10
A:
http://morlhon.net/blog/2005/09/07/eclipse-username/
It seems that your best bet is to redefine the java user.name variable either at your command line, or using the eclipse.ini file in your eclipse install root directory. This seems to work fine for me:
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Duser.name="Davide Inglima"
-Xms40m
-Xmx512m
Davide Inglima
2008-10-29 09:49:15
The risk is that this will break any plug in that needs to know the user ID (which is the documented value of the user.name property). It would be nice if there was a better way to adjust the value Eclipse will use for that variable.
Diastrophism
2010-05-05 23:42:55
A:
If you're curious the default version of the variable can be obtained by calling:
System.getProperty("user.name")
and where Java takes it from is system dependent.
Maciej Biłas
2009-12-10 15:45:59