wood burning stoves 2.0*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "obtain cpu id,mac id" Watch "obtain cpu id,mac id" New topic
Author

obtain cpu id,mac id

Paru kutty
Greenhorn

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
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"Parvathy85",
Please check your private messages.
-Ben


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

Joined: Aug 31, 2004
Posts: 11343

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.


"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
sscce.org
Pratap koritala
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: obtain cpu id,mac id
 
Similar Threads
WA #1.....word association
Get MAC/CPU/HD-KEY
Do we have any massager who will give me facility to login in with multiple accounts (yahoo, gmail,
how to write this C code
How to lock java app for single PC