Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 8 of 8

Thread: hardware ID

  1. #1
    Junior Member
    Join Date
    Sep 2009
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Arrow hardware ID

    how to find the hardware ID like, Harddisk serial number, processor serial number, motherboard serial number, etc. in java?


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: hardware ID

    Unfortunately, that's not possible in pure Java. You can look into JNI, though.

  3. #3
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: hardware ID

    Not sure but SIGAR might offer something.

    Sigar API

    // Json

  4. #4
    Junior Member
    Join Date
    Sep 2009
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation Re: hardware ID

    i will be helpful if i have code snippet.coz i am new to java. thank u in advance.

  5. #5
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: hardware ID

    I wouldn't recommend doing JNI stuff if you are new to Java, unless you are coming from a C/C++ background.

    // Json

  6. #6
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: hardware ID

    It's my standard answer to anything that can't be done in pure Java. Why do you want to know the serial number of your harddisk and such? It's much easier to try and find that on the hardware itself (particularly the mother board).

  7. #7
    Junior Member
    Join Date
    Sep 2009
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: hardware ID

    actually i am doing a project to attach hardware IDs with email. so that we can easily track the email. it will have uses in some other fields also.

  8. #8
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: hardware ID

    How many of these things do you have to look up? It may be easier to manually look them up and store those codes with some key-file on your computer (say like putting a serials.cfg file somewhere on that computer). This way, your program only will have to handle file reading, a much easier task.

    FYI: I think that windows machines generate their own serial codes for hard disks that may or may not be the same as the manufacturer's serial codes. This is because of the way window's drivers work, and each partition of a single hard-drive produces a separate serial code.

Tags for this Thread