1. If you're receiving a message that you are banned from the Current Events or Politics forums, it's not you specifically: those forums have been hidden for all users. For more info, see here.
    Dismiss Notice

help with java finding logged on user

Discussion in 'Programming & Software Development' started by simultech, May 5, 2003.

  1. simultech

    simultech Member

    Joined:
    Sep 18, 2001
    Messages:
    49
    making a java program that needs to know the username of the person logged onto the computer at the current time. ive found (i think) with c++ u can do something like: set blah = setobject.currentuser;, just wondering how to find out in java ? :-0 any help would be appreciated ta
     
  2. Geo

    Geo Member

    Joined:
    Jun 27, 2001
    Messages:
    2,368
    Location:
    Adelaide
    Code:
    
    String username = System.getProperty("user.name");
    
    
     

Share This Page

Advertisement: