java.lang.UnsatisfiedLinkError

4 posts / 0 new
Last post
Offline
Last seen: 6 years 8 months ago
Joined: 12/03/2017
Posts: 6
java.lang.UnsatisfiedLinkError

Hi! I have a question about JRE and JDK usage.

I have a project where I'm going to use DDS. Project requires that I use JDK for compilation and in this case, I get the following error:

java.lang.UnsatisfiedLinkError: no nddsjava in java.library.path
The library nddsjava.dll could not be loaded by Windows.
Sørg for at biblioteket er i ditt Path environment variable.

What is the reason for that? Could not DDS be run with JDK? I have tried to add a path to the .dll file in the environment| variable PATH, but it did not help.

Is there anyone who can help me solve this problem?

My setup is:

Windows 10 Pro 64bit

RTI Connext DDS 5.3.0

Java 8 update 151 (I have also tried Java 7)

Microsoft Visual C++ 2015 Redistributable

 

P.s I have no issues running DDS with JRE, but in my case, it has to be JDK.

 

 

Offline
Last seen: 11 months 2 weeks ago
Joined: 02/11/2016
Posts: 144

Hey Funnjy,

To run Java with RTI you need:

1. a jar (nddsjava.jar) of the right (architecture + rti connext dds version) version to be in the classpath

2. nddsjava.dll to be in the PATH

Are you using an IDE? if so, can specify which and explain how you've set up your project?

Could you post your PATH?

also, if you're somehow modifying your PATH, do so before starting up any IDE you may be using (many of them will load environment variables only at start time).

 

Good luck,

Roy.

 

Offline
Last seen: 6 years 8 months ago
Joined: 12/03/2017
Posts: 6

Hi Roy, 

I'm using Eclipse IDE with HEADS compiler(https://github.com/HEADS-project/training/tree/master/1.ThingML_Basics). My project is originally written in ThingML(modeling language). And this is the main reason why I need to use JDK. I do compile my code to Java. After compilation, I have a Maven project which I run with Maven Build command. 

My path is as follows: C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Docker\Docker\Resources\bin;C:\oraclexe\app\oracle\product\11.2.0\server\bin;C:\Perl64\site\bin;C:\Perl64\bin;%JAVA_HOME%\bin;C:\Windows\System32;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Users\Anton Ilchenko\Downloads\apache-maven-3.5.2-bin\apache-maven-3.5.2\bin;C:\Windows\SysWOW64\WindowsPowerShell\v1.0;C:\Program Files\Git\cmd;C:\Program Files\rti_connext_dds-5.3.0\lib;%NDDSHOME%;C:\Program Files\rti_connext_dds-5.3.0\lib\x64Win64VS2015;

 

Regards 

 

Anton 

Offline
Last seen: 6 years 8 months ago
Joined: 12/03/2017
Posts: 6

I finally got things to work with JDK! What I did was to configure dds example java project to be a maven project with for example groupID = omg, artifactId = dds and version = 1.0. Then I copied nddsjava.jar into project and ran the following command from the terminal where the pom.xml file is located: mvn install: install-file -Dfile = nddsjava.jar -DgroupId = omg -DartifactId = dds -Dversion = 1.0 -Dpackaging = jar.

It might be not necessary to have nddsjava.jar, but for my project I do. 

Many thanks for my professor who helped me find a solution!

P.s Hope this solution might be useful for somebody.