• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

obtain cpu id,mac id

 
Paru kutty
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,i would like to know how to retrieve my system's mac id,cpu id using java..thanking you in advance...take care
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the MAC address, see the getHardwareAddress() method in java.net.NetworkInterface class (new to Java 1.6).

According to devx.com - Preparing for Hyper-Threading...
The CPUID instruction is not visible from high-level languages such as C/C++, C#, or Java. Calling CPUID from these languages requires either support for inline assembly or the ability to call an assembly language routine.
 
Ramya Chowdary
Ranch Hand
Posts: 252
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do it with C++ using Windows management instrumentation API.
Then,use JNI for communication between c++ and java.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic