my dog learned polymorphism
The moose likes Java in General and the fly likes obtain cpu id,mac id Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "obtain cpu id,mac id" Watch "obtain cpu id,mac id" New topic

obtain cpu id,mac id

Paru kutty

Joined: May 16, 2008
Posts: 6
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

Joined: Dec 11, 2004
Posts: 13410

Please check your private messages.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
marc weber

Joined: Aug 31, 2004
Posts: 11343

For the MAC address, see the getHardwareAddress() method in class (new to Java 1.6).

According to - 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.

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
Ramya Chowdary
Ranch Hand

Joined: Sep 27, 2006
Posts: 252
You can do it with C++ using Windows management instrumentation API.
Then,use JNI for communication between c++ and java.
I agree. Here's the link:
subject: obtain cpu id,mac id
It's not a secret anymore!