Hello
Can anyone give me a link to sample programs on serial communication
using java comm API? I need to send and receive data thro the serial
port(COM1). I tried downloading the generic zip file from the sun
site: http://www.sun.com/download/products.xml?id=43208d3d . But this
file doesn't seem to contain any documentation or sample code. Please
guide me!
Regards
Quad
Andrew Thompson - 24 Feb 2007 14:31 GMT
> Hello
> Can anyone give me a link to sample programs on serial communication
> using java comm API?
Tune into this thread, maybe it will help..
<http://groups.google.com/group/comp.lang.java.programmer/browse_frm/
thread/1508e32ebcc6169e/#>
Andrew T.
Thomas Fritsch - 24 Feb 2007 15:45 GMT
quad schrieb:
> Hello
> Can anyone give me a link to sample programs on serial communication
[quoted text clipped - 3 lines]
> file doesn't seem to contain any documentation or sample code. Please
> guide me!
It is all from page <http://java.sun.com/products/javacomm/>.
The link "Documentation" leads to a Users' Guide with 2 small examples.

Signature
Thomas
quad - 25 Feb 2007 15:26 GMT
Hello
Thanks a lot for your prompt guidance. I tried running the examples on
the following link.
http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html.
Are those programs specific to solaris? Will they work on windows?
I get the following errors when i tried to run the programs:
E:\project\ckt download\Serial_port\trial2\classes>java SimpleWrite
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no
SolarisSerialPar
allel in java.library.path
Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while
loading driver c
om.sun.comm.SolarisDriver
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no
SolarisSerialPar
allel in java.library.path
Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while
loading driver c
om.sun.comm.SolarisDriver
port COM1 not found.
E:\project\ckt download\Serial_port\trial2\classes>java SimpleRead
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no
SolarisSerialPar
allel in java.library.path
Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while
loading driver c
om.sun.comm.SolarisDriver
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no
SolarisSerialPar
allel in java.library.path
Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while
loading driver c
om.sun.comm.SolarisDriver
port COM1 not found.
I get the following errors:
comm.jar is placed in:
%JAVA_HOME%/lib
%JAVA_HOME%/jre/lib/ext
win32com.dll is placed in:
%JAVA_HOME%/bin
%JAVA_HOME%/jre/bin
%windir%System32
javax.comm.properties is placed in:
%JAVA_HOME%/lib
%JAVA_HOME%/jre/lib
Environment variable PATH also points to comm.jar file. Please guide
me as to how I can correct the above errors.
Regards
Quad
P.S: I multiposted cos my initial post wasn't updated initially, and I
wasn't sure if the mail had got posted. No hard feelings pls!