Re: How To retrieve the full user name, in Vista??
- From: Jan Burse <janburse@xxxxxxxxxxx>
- Date: Fri, 28 Dec 2007 16:22:06 +0100
apm35@xxxxxxxxxxxxxxxxxx schrieb:
What the OP is asking for is inherently non-portable so no solution is
going to be completely clean. The way I would do it is write a little
C program that returns the username, then invoke it from script that
runs the java program. The script can pass this value as a java
property which is picked up via System.getProperty. I did something
similar for a program I have that needs to know the UNIX pid, which
also cannot be obtained in a portable way.
Regards,
Andrew Marlow
I think it should be arround, from what I saw in J2EE,
but I cannot figure out where it is:
http://java.sun.com/javaee/5/docs/api/javax/xml/registry/infomodel/package-tree.html
There is an interface PersonName. Which has methods
getFullName() and setFullName().
But I don't see what would help me to populate it
from the underlying operating system. Windows and Unix
do have stored user full names.
Probably expensive tool suites like Sun Java System
Identity Manager 5.0 should also be able to access OS
full names I assume.
But I am looking for a simple portable solution.
Bye
.
- References:
- How To retrieve the full user name, in Vista??
- From: Jan Burse
- Re: How To retrieve the full user name, in Vista??
- From: Roedy Green
- Re: How To retrieve the full user name, in Vista??
- From: apm35
- How To retrieve the full user name, in Vista??
- Prev by Date: Re: Help with packages getting started
- Next by Date: Re: when will Tuple be std?
- Previous by thread: Re: How To retrieve the full user name, in Vista??
- Next by thread: Graphing data in Java
- Index(es):