Results 1 to 4 of 4
  1. #1
    nwboy74 is offline Member
    Join Date
    Oct 2008
    Posts
    45
    Rep Power
    0

    Default Query for User Login Information

    Is it possible for a java application to query the operating system for a user name? Background: at work, everyone logs in to their Windows machines with a user name and password. I have an application that needs to know who is using it. Short of asking the person to enter their name and/or a password, I'd like to "just know" because they already logged in to their pc.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default

    Where does Windows store this info? Is there an API for it that a C program could use to get the info? Then you could use JNI to get the info into a java program.

    What data is in the System.properties?
    Properties props = System.getProperties();
    props.list(System.out);

  3. #3
    nwboy74 is offline Member
    Join Date
    Oct 2008
    Posts
    45
    Rep Power
    0

    Talking

    Thank you, Norm! You are a genius!

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

Similar Threads

  1. Replies: 2
    Last Post: 05-18-2010, 03:12 PM
  2. Replies: 1
    Last Post: 03-15-2010, 01:39 AM
  3. Single login for a user at a time
    By mitali l joshi in forum Java Servlet
    Replies: 4
    Last Post: 01-22-2010, 10:23 AM
  4. Login user name - for all platforms.
    By Eranga in forum Advanced Java
    Replies: 0
    Last Post: 03-17-2008, 05:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •