Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   Usage of Serial Com Port communication (http://www.go4expert.com/forums/usage-serial-com-port-communication-t21052/)

calvinlyp 20Feb2010 06:42

Usage of Serial Com Port communication
Hi all,

currently i am trying to use a java app to read from my usb to serial port on my PC.

i research and found that Windows COM ports are not directly supported by Sun anymore. thus there is another package called rxtx.

i tried the above link with my app, however it return me portId=null;

from the link below:(New Windows Java Serial Com Port driver with proper handling of Timeouts)

it stated that the usb to serial maybe a problem when using the rxtx package, and this winjcom maybe a good substitute.

however, is there any expertises can share their advice on how to use this winjcom.

thanks in advance.
any help will be greatly appreaciated.

shabbir 20Feb2010 10:09

Re: Usage of Serial Com Port communication
Moved your attachment into the post

ewaldhorn 3Mar2010 11:53

Re: Usage of Serial Com Port communication

I've had mixed success with using COM ports on Windows through Java. What I'd recommend is that you find a good C/C++ DLL you can use and then using JNI (Java Native Interface) to call it and do what you need to do.

Could you explain the USB to COM thing though? Do you want to read directly from the USB device or treat it like a COM port?


All times are GMT +5.5. The time now is 10:58.