Read Windows System properties

Hi ,

i want to read the some properties in windows 2000 from java,

If u go to

control panel - System - hardware - Device manager - port - COM1 then right click on it and see the properties, and click the Port Settings.

I want to read the bits per second from there.

Ashish

[318 byte] By [kulkarni_ash] at [2007-9-26 9:59:02]
# 1

Yes, quite portable Java would be to allow this 8-))) . Boy, awake from dream world -- all OSes are different!

To work with Windows settings, you should:

1) Know where this settings is stored (buy MSDN). I just can hint that somewhere in Registry.

2) Use JNI to call Win32 API to access this value.

Good luck.

I would recommend to specify this by user. Hardware is admin's responibility, or at least advanced user.

wwk_killer at 2007-7-1 21:47:08 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
You can see http://java.sun.com/products/javacomm/javadocs/javax.comm.SerialPort.html#getBaudRate() though.
wwk_killer at 2007-7-1 21:47:08 > top of Java-index,Java HotSpot Virtual Machine,Specifications...