Google Answers Logo
View Question
 
Q: Serial Port usage in Java ( No Answer,   4 Comments )
Question  
Subject: Serial Port usage in Java
Category: Computers
Asked by: leonidbash-ga
List Price: $50.00
Posted: 25 May 2003 03:40 PDT
Expires: 31 May 2003 08:39 PDT
Question ID: 208382
tried using Java comm API on Linux platform 
When calling   CommPortIdentifier.getPortIdentifiers()
 got 
Caught java.lang.UnsatisfiedLinkError: no Serial in java.library.path while load

What do I have to do to make it work
Answer  
There is no answer at this time.

Comments  
Subject: Re: Serial Port usage in Java
From: bio-ga on 25 May 2003 07:15 PDT
 
Sorry but Java COMMAPI is currently only supported for Solaris/SPARC,
Microsoft Windows and Solaris/x86. That's why you are having an
UnsatisfiedLinkError, which is an exception related with native
libraries (such as COMMAPI). You don't have much to do other than
waiting for Sun to release a version for Linux. Alternatively you can
try your chance with a third party COMM driver such as JCL (Java Comm
for Linux):

http://www.geeksville.com/~kevinh/linuxcomm.html

Regards
Bio
Google Answers Researcher
Subject: Re: Serial Port usage in Java
From: mark_f-ga on 25 May 2003 11:44 PDT
 
Hi,

My answer is, in reality, a development from Bio's comment and keeps
my Java knowledge base from vegetating. Unlike Bio, my installation
experience is Windows Java, my Linux Java experience coming
pre-configured. My Java comms experience is a Socket-based chatroom
Protocol, Server and Client window allowing HTML tags.


* An identical question thread to yours is located on Sun at -

 http://forum.java.sun.com/thread.jsp?forum=8&thread=175806

* Most up-to-date Linux Java Serial-Programming "patches" are -

http://www.rxtx.org/download.html
http://www.geeksville.com/~kevinh/linuxcomm.html (this code is
contained within the RXTX distribution)

* The following should assist in "patching" your Linux installation -

http://wass.homelinux.net/howtos/Comm_How-To.shtml
http://www.apms.com.au/tini/javakit.html (The TINI JavaKit itself is
unrelated)

* For other Linux Java Serial-Programming HOWTOs see -

http://www.mail-archive.com/cgi-bin/htsearch?config=java-linux_java_blackdown_org&restrict=&exclude=&words=CommAPI
[or RXTX]
://www.google.com/search?q=Linux+serial+CommAPI [or RXTX]

* For CommAPI (javax.comm) Serial-Programming in general -

http://pharos.inria.fr/Java/query.jsp?cids=c_2071&sort=title
http://sourceforge.net/projects/jcomm (an example full project)


Please donate your $50 tag to a Christian org instead, for instance
www.barnabasfund.org/donations.htm

Thanks,
Mark F
GB


My Ref: Serial Port usage in Java
http://answers.google.com/answers/main?cmd=threadview&id=208382
Subject: Re: Serial Port usage in Java
From: ldavinci-ga on 26 May 2003 16:36 PDT
 
Hi leonidbash-ga,

You do not have native libraries to access the comm port through your
Java application.

You may want to download linux based libraries from
http://www.rxtx.org

They have clear instructions on how to use the comm API in linux. The
comm api has become gnu.io package in the latest version of rxtx
libraries. You may have to replace java.comm.* with gnu.io.*

Let me know if it works for you.

Regards
ldavinci-ga
Subject: Re: Serial Port usage in Java
From: tashton-ga on 29 May 2003 18:33 PDT
 
You should be able to access the serial ports by reading and writing
to /dev/ttyS* from within Java.

The difficult part would be configuring the serial port before using
it, but you the "setserial" command will to do that.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy