Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / February 2007

Tip: Looking for answers? Try searching our database.

Java comm API examples needed

Thread view: 
quad - 24 Feb 2007 14:04 GMT
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!


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.