Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6095103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:46:29+00:00 2026-05-23T12:46:29+00:00

Hi im trying to read com port, so I add library to my java

  • 0

Hi im trying to read com port, so I add library to my java directory like
they wrote here but when Im witing simple code like

import java.util.Enumeration;
import javax.comm.*;

public class CompotCore {

    public static void main(String[] args) 
    {
        Enumeration list = CommPortIdentifier.getPortIdentifiers();
    }

}

I get such error:

java.lang.UnsatisfiedLinkError: no Serial in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
    at java.lang.Runtime.loadLibrary0(Runtime.java:840)
    at java.lang.System.loadLibrary(System.java:1047)
    at gnu.io.RXTXCommDriver.<clinit>(RXTXCommDriver.java)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:186)
    at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:237)
    at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:109)
    at CompotCore.main(CompotCore.java:11)
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.sun.comm.SunrayInfo.isSessionActive()Z
    at com.sun.comm.SunrayInfo.isSessionActive(Native Method)
    at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155)
    at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100)
    at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:138)
    at CompotCore.main(CompotCore.java:11)

i read that I had to add System.load("Serial"); with full path but I dont have such library and dont know where to find it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:46:30+00:00Added an answer on May 23, 2026 at 12:46 pm

    On the site you link to it includes instructions to copy two native libraries into your JRE lib dir:

    cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so /usr/java/j2sdk1.4.0/jre/lib/i386/
    cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so /usr/java/j2sdk1.4.0/jre/lib/i386/
    

    Are they there?

    Be sure you are copying them into the correct JRE. What does which java tell you?

    An alternative to copying to jre/lib would be to have them in some other location and then point to that dir with the System Property java.library.path, e.g. you would execute Java like this to start your program

    java -Djava.library.path=<dir_with_those_libs> <your_other_args>

    Update

    OK I downloaded the rtxt tar and took a look. After you untar it, you have the following (one example):

    ls -l rxtx-bins.1/1.4/i386-pc-linux/
    total 44
    -rwxr-xr-x 1 root root  9700 Dec  5  2001 libParallel-1.4.15.so
    lrwxrwxrwx 1 root root    21 Jul  6 03:23 libParallel.so -> libParallel-1.4.15.so
    -rwxr-xr-x 1 root root 31400 Dec  5  2001 libSerial-1.4.15.so
    lrwxrwxrwx 1 root root    19 Jul  6 03:23 libSerial.so -> libSerial-1.4.15.so
    

    If you followed the instructions from that page, you will have only copied the links, not the actual libs. So the solution will be to copy ALL the files, something like this:

    cp rxtx-bins.1/1.4/i386-pc-linux/* /usr/java/j2sdk1.4.0/jre/lib/i386/
    

    Or alternatively to execute Java something like:

    java -Djava.library.path=~/rxtx-bins.1/1.4/i386-pc-linux:$LD_LIBRARY_PATH <your_other_args>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to read mails from my live.com account, via the POP3 protocol. I've
I'm trying to implement a pattern I read from Don Syme's blog ( https://blogs.msdn.microsoft.com/dsyme/2010/01/09/async-and-parallel-design-patterns-in-f-parallelizing-cpu-and-io-computations/
Trying to read an RSS and select information using Linq but can't seem to
I am trying to read a single file from a java.util.zip.ZipInputStream , and copy
I'm trying to send an iCal to an outlook, using Java Mail Library, I've
In Python, I'm trying to read the values on http://utahcritseries.com/RawResults.aspx . How can I
I've been trying to use openssl to establish a connection with smtp.gmail.com port 587
Problem : Trying to read from some electronic scales using the comport via Java
Ok, this should be dirt simple. I'm trying to read charactes from a serial
I'm trying to read the ticker symbol at https://mtgox.com/api/0/data/ticker.php from my C++ application. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.