How can I get the serial number of the hard disk with Java?
Java – How to get the hard disk serial number using Java
java
Related Topic
- Java – How to read / convert an InputStream into a String in Java
- Java – How to generate random integers within a specific range in Java
- Java – What’s the simplest way to print a Java array
- Java – How to break out of nested loops in Java
- Java – How to get the current working directory in Java
- Java – How to convert a String to an int in Java
- Java – How to create a memory leak in Java
- Java – Why is processing a sorted array faster than processing an unsorted array
Best Answer
This serial number is created by the OS where formatting the drive and it's not the manufacturer serial number. It's unique, because it is created on the fly based on the current time information. AFAIK, there is no API that return that the manufacturer SN. At best, the SN of the HD firmware can be read but this will involve some very low-level API calls. Keep in mind that even if you get that number, there is no warranty that it will be unique since each manufacturer can assign the SN as they wish.