473,386 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Ethernet ID and system Info in Java

Hi,

I want to know if there is a way to get system level information using Java.
I am mostly interested in things like Ethernet ID and serial number of Hard
disk. Some of the values when you type "ipconfig /all" on windows.

I know we can do all this using JNI with the main routines written in C. But
is there a way to do it using Java alone?. I have not seen any API to help
me get such deep system level information.

Thanking you,
Jul 17 '05 #1
2 7420
"Ashwini Kumar" <as***********@comcast.net> wrote in message news:<PZ********************@comcast.com>...
Hi,

I want to know if there is a way to get system level information using Java.
I am mostly interested in things like Ethernet ID and serial number of Hard
disk. Some of the values when you type "ipconfig /all" on windows.

I know we can do all this using JNI with the main routines written in C. But
is there a way to do it using Java alone?. I have not seen any API to help
me get such deep system level information.

Thanking you,


Call a C program or an assembly language program from Runtime#exec()
and read the result from Process#getInputStream().
Jul 17 '05 #2
"hiwa" wrote
"Ashwini Kumar" wrote
Hi,

I want to know if there is a way to get system level information using Java. I am mostly interested in things like Ethernet ID and serial number of Hard disk. Some of the values when you type "ipconfig /all" on windows.

I know we can do all this using JNI with the main routines written in C. But is there a way to do it using Java alone?. I have not seen any API to help me get such deep system level information.

Thanking you,


Call a C program or an assembly language program from Runtime#exec()
and read the result from Process#getInputStream().


IP address may vary if PC gets its IP from DHCP.

You can get the IP address fairly easily in Java (see InetAddress class) but
MAC address is not possible in Java (AFAIK).

There isn't a common Windows function in every version of Windows that gets
MAC address - there are actually many routines to get MAC address for
example; it depends on the version of Windows and what is installed. See
http://www.codeguru.com/network/GetMAC.html

I think the easiest way is to exec ipconfig (depending on how "professional"
it needs to look). MAC address can be modified (but not many people know
that).
See http://forum.java.sun.com/thread.jsp...1&thread=46369

You can get hard disk's volume serial number from executing "dir". However
they are not unique e.g. disk cloning (commonly done by Sys admins to
configure new PCs in commercial environments) will copy it.

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Chaser | last post by:
Hi folks, Just wondering if anyone knows where I can find modules for NI-488.2 GPIB and for a generic ethercard? Thanks.
1
by: dalewz | last post by:
Hi, I am thinking to use C# in MS VS.net to support GUI and Ethernet communication. I heard that this is doable by opening a socket. Could sb share more info on this? Thanks. -Dale
1
by: jb | last post by:
Hi all: I was just wondering if there is a way to check (using python scripting) whether the computer's connectivity is via Dial-up or LAN/Ethernet adaptor? Is there a way in python to check the...
3
by: Bob Greschke | last post by:
There is a lot to stuff that seems to skirt around this issue (most of which has to do with finding your IP address), but I can't find anything that explains how to write a client that (in my case)...
1
by: keke3905 | last post by:
I really would appreciate some help on this assignment. I need to make GUI boxes to display the system info such as on Microsoft Office. I have some code but not sure where to go with the rest of...
2
by: illusion | last post by:
Need help im not either getting da idea how to detect ethernet card and to read data file from it when there is a client server scenerio and server & client both knows eachother's IP address(but in...
11
by: gustavo.samour | last post by:
Hi, I am writing a very basic raw ethernet sniffer based on what I found in Andreas Schaufler's raw ethernet article: http://aschauf.landshut.org/fh/linux/udp_vs_raw/ch01s03.html I'm trying...
1
by: kavok | last post by:
I am writing a software that needs to sniff packets in the network (raw ethernet) and also, with another thread send regular UDP packets with the common socket API's. However, when the RAW...
1
by: grndvl1 | last post by:
I am attempting to write an abstract layer to make Ethernet and Serial seemless in my application. I have an interface that is the what I call ILayer it has the method stubs for connect, disconnect,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.