0

I want to get hardware ids of processor, motherboard and harddisk from java and c++. Please help me in this. In all oses like windows,linux,mac os.

user2854069
  • 1
  • 1
  • 1
  • 2
  • I searched few questions on stack but all are only for windows, i want it for all os. Please please guide me. – user2854069 Oct 10 '13 at 09:43
  • Try this, already it is discussed. http://stackoverflow.com/questions/1986732/how-to-get-a-unique-computer-identifier-in-java-like-disk-id-or-motherboard-id – Rajan Oct 10 '13 at 09:55
  • @Rajan not really, the OP asks something completely different ... – Polentino Oct 10 '13 at 10:12
  • check this answer and discussion (notice that it also refers to linux in comments), http://stackoverflow.com/a/11533135 – oblitum Oct 10 '13 at 21:09

1 Answers1

0

That's a tough topic. I would suggest, if you are brave enough, to use Solid, which is KDE's hardware device framework, which works under Linux/Win/Mac. But you have to take into consideration that Solid will require a lot of extra dependencies, i.e. KDE and Qt libraries (some of them), along with the underlying libs which deal with hardware access, so the size of your whole project will increase a lot. KDE guys are working, as we speak, to a deep refactoring of their libraries, to get smaller and indipendent subset of their libs, so in a near future Solid will be available with less dependencies than now. The question is: is it worth to pull such big and extra dependencies to your project? Are you ready to afford the technical difficulties about ship/deploy those libs on each platform? If the answer is yes, then use it; otherwise, you should try something different (and I have no idea other than Solid), or write your thin&light library which wraps the OS-specific calls to get those informations from the hardware.

Polentino
  • 907
  • 5
  • 16