Click to See Complete Forum and Search --> : Accessing Serial ports
ink777
July 31st, 2003, 05:48 AM
Do we have the equivalent of MSComm Control and the ActiveX Communications Control of VB in Java? I tried out the BlackBox and SimpleRead samples provided on Sun's site; they don't work.
When I execute BlackBox, I get 'No serial ports found'. SimpleRead does not find any of the COM ports from 1 to 4.
If anybody could get these samples to work, could you please give me some guidance? I am trying to write to and read from a serial port. I work on Windows 2000.
dlorde
August 1st, 2003, 06:55 AM
As I understand it, Windows 2000 (and NT/XP) does not allow direct access to hardware serial ports. An appropriate driver is needed to interface with the HAL (Hardware Abstraction Layer).
How this is resolved with Java, I don't know. Possibly via JNI (Java Native Interface).
I'm guessing here...
There are 10 different kinds of people in the world: those who know binary and those who don't...
Anon.
ink777
August 1st, 2003, 07:53 AM
Hi Dave,
When I install the Java communications API, it includes 'win32com.dll'. I guess that this is the driver you are talking about.
dlorde
August 1st, 2003, 04:48 PM
Quite possibly...
What I cannot create I do not understand...
R. Feynman
Bottesford
October 13th, 2003, 05:37 PM
Just found the forum and digged up this thread which contains my own source of frustration!
Got my Java comm api all in and suppossedly working. Java seems unable to do anything to my serial port - it cannot even find the port!
Has anyone had any luck getting Java to talk to the serial port?
All I need to do is send integers to it- nothing more, nothing less...
Any help would be most welcome!
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.