Problems with libnddsjavad.so in java, IntelliJ, Ubuntu 14

3 posts / 0 new
Last post
Offline
Last seen: 9 years 2 weeks ago
Joined: 08/03/2015
Posts: 8
Problems with libnddsjavad.so in java, IntelliJ, Ubuntu 14

Hi,

I'm working in a DDS project in Java under Ubuntu using the IDE IntelliJ IDEA. The program compiles succesfully but when I execute it, under Ubuntu, it fails showing the following error:


The library libnddsjavad.so could not be loaded by Linux.
Make sure that the library is in your LD_LIBRARY_PATH environment variable.


As indicated the error, I checked my LD_LIBRARY_PATH and it's right. LD_LIBRARY_PATH is defined in .bashrc as follows:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$NDDSHOME/lib/x64Linux3gcc4.8.2
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$NDDSHOME/lib/java


and the missed library, libnddsjavad.so is in ../x64Linux3gcc4.8.2 directory.

The same program deployed under Windows in java and using the same IDE, InelliJ, works properly.

The others tools such as rtiddsgen or rtiddsspy works perfectly, also I executed some examples provided by RTI webside in terminal without problems.

I belive that is problem of IntelliJ configuration on Ubuntu because under Windows is well configured and I don't know what to do, I have no more ideas to try.

 

Thanks a lot!

Organization:
Fernando Garcia's picture
Offline
Last seen: 4 months 2 weeks ago
Joined: 05/18/2011
Posts: 200

Hi Marti,

I think since Ubuntu 9.04 you can only set the  LD_LIBRARY_PATH inside an interactive shell (i.e., it cannot be set in files such as ~/.bashrc, ~/.profile, etc.). The best alternative -- if you have admin privileges -- is to create new /etc/ld.so.conf.d/*.conf file with the path to RTI's dynamic libraries. In your case, you only need to add the lib/x64Linux3gcc4.8.2 directory (i.e., you do not need to add the jar files to the library path).

The file could be called /etc/ld.so.conf.d/rticonnextdds-5.2.0.conf and should look like this:

# RTI shared libraries
/path/to/your/connext/installation/rti_connext_dds-5.2.0/lib/x64Linux3gcc4.8.2

Once you have created the file, you need to run ldconfig as follows to cache the dynamic libraries you just added:

sudo ldconfig

Please, let me know if this work for you.

Thanks,
Fernando.

Offline
Last seen: 9 years 2 weeks ago
Joined: 08/03/2015
Posts: 8

Hi Fernando,

Excuse me for having taken so long to ansewer. Your advise works perfectly. Since the file.conf is defined, the declaration of LD_LIBRARY_PATH in .bashrc is useless.

Thank you Fernando.