Search code examples
javauser-accounts

getting system account information java?


Is it possible to get the current account information (on computer) things like their username and profile picture using Java? any help would be appreciated

thanks, TC


Solution

  • See http://download.oracle.com/javase/tutorial/essential/environment/sysprop.html for a a list of system properties available to the JVM on every OS.

    You can then access a property using String prop = System.getProperty("user.name").

    There's no universal access to any profile picture that I know of. There might be OS-specific libraries for that.