How do I retrieve a unique computer ID from java

Discussion in 'Java' started by Rick D., Jan 3, 2005.

  1. Rick D.

    Rick D. Guest

    Hi all,

    I'm looking for a way to retrieve unique information from a specific
    computer from a java application. Things like NIC/Mac number,
    processor info or any information that can be used to make some kind
    of computer ID. I've browsed the api documentation, and used google to
    search but didn't find anything useful. Does anybody know if it can be
    done or is it just not possible in java.

    Any help would be greatly appreciated.

    Best Regards,
    Rick
     
    Rick D., Jan 3, 2005
    #1
    1. Advertising

  2. Rick D.

    Guest

    Did you check the java.net package ?
    Eg: stHostname=java.net.InetAddress.getLocalHost().getHostName();
    gives you the hostname of the current machine. Compute a hash on the
    hostname
    if you need a number. Either use the hashCode() method or (more
    sophisticated)
    perform an MD5.
     
    , Jan 3, 2005
    #2
    1. Advertising

  3. wrote:
    > Did you check the java.net package ?
    > Eg: stHostname=java.net.InetAddress.getLocalHost().getHostName();
    > gives you the hostname of the current machine.


    Hostnames are worthless as UID, even if you use getCanonicalHostName();
    in dialup networks, hostnames are shifted around just as much as IP
    addresses.
     
    Michael Borgwardt, Jan 4, 2005
    #3
  4. Rick D.

    Yakov Fain Guest

    Rick D. wrote:
    > Hi all,
    >
    > I'm looking for a way to retrieve unique information from a specific
    > computer from a java application. Things like NIC/Mac number,
    > processor info or any information that can be used to make some kind
    > of computer ID. I've browsed the api documentation, and used google

    to
    > search but didn't find anything useful. Does anybody know if it can

    be
    > done or is it just not possible in java.
    >
    > Any help would be greatly appreciated.
    >
    > Best Regards,
    > Rick


    Find a way to get it using a command from your computer's OS.
    Then call this command from Java using Runtime.getRunTime().exec()
    Regards,
    Yakov Fain
     
    Yakov Fain, Jan 4, 2005
    #4
  5. Rick D.

    Tom Dyess Guest

    "Yakov Fain" <> wrote in message
    news:...
    >
    > Rick D. wrote:
    >> Hi all,
    >>
    >> I'm looking for a way to retrieve unique information from a specific
    >> computer from a java application. Things like NIC/Mac number,
    >> processor info or any information that can be used to make some kind
    >> of computer ID. I've browsed the api documentation, and used google

    > to
    >> search but didn't find anything useful. Does anybody know if it can

    > be
    >> done or is it just not possible in java.
    >>
    >> Any help would be greatly appreciated.
    >>
    >> Best Regards,
    >> Rick

    >
    > Find a way to get it using a command from your computer's OS.
    > Then call this command from Java using Runtime.getRunTime().exec()
    > Regards,
    > Yakov Fain
    >


    I would shoot for the Nic's MAC address, or make a mixed key using several
    identifiers such as mac+os+hostname.

    --
    Tom Dyess
    OraclePower.com
     
    Tom Dyess, Jan 5, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Goh
    Replies:
    4
    Views:
    8,015
    Steven Cheng[MSFT]
    Dec 16, 2005
  2. Rhino
    Replies:
    8
    Views:
    586
    Rhino
    Jun 18, 2004
  3. ToshiBoy
    Replies:
    6
    Views:
    888
    ToshiBoy
    Aug 12, 2008
  4. Purdy

    retrieve unique id or phone number

    Purdy, Jul 27, 2004, in forum: ASP .Net Mobile
    Replies:
    2
    Views:
    262
    Jean-Luc David [MS-MVP]
    Jul 30, 2004
  5. Token Type
    Replies:
    9
    Views:
    393
    Chris Angelico
    Sep 9, 2012
Loading...

Share This Page