Java Web Start

2 posts / 0 new
Last post
Offline
Last seen: 9 years 6 months ago
Joined: 08/29/2014
Posts: 2
Java Web Start

Is it possible to use RTI DDS with Java Web Start?  Through web start you can package up native libraries and reference them based on their architecture in the JNLP like this:

<resources os="Windows" arch="x86">
<nativelib href="lib/nddsjava-natives-windows-i586.jar"/>
</resources>
<resources os="Windows" arch="amd64">
<nativelib href="lib/nddsjava-natives-windows-amd64.jar"/>
</resources>

Wher the nddsjava-natives-XXXX is a jar with all of the dlls for java inside of it (nddsc.dll nddscd.dll nddscore.dll nddscored.dll nddsjava.dll nddsjavad.dll, )

I've done a little bit of playing around with this by packaging up the DLLs into jars and trying them out, but I get errors like this on Windows:

JNLPClassLoader: Finding library nddsjava.dll
JNLPClassLoader: Finding library nddsjavad.dll
The library nddsjava.dll could not be loaded by Windows.
Make sure that the library is in your Path environment variable.
java.lang.UnsatisfiedLinkError: C:\Users\DefaultUser\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\28\7ef85c1c-15fc067d-n\nddsjava.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.rti.dds.util.NativeInterface.loadNativeLibrary(Unknown Source)
at com.rti.dds.util.NativeInterface.loadNativeLibraries(Unknown Source)

 

 I've verified that I'm using the correct (x86) versions of the libs.

 

 

Offline
Last seen: 9 years 6 months ago
Joined: 08/29/2014
Posts: 2

Found the solution.. It is to force load the libs from my own code in the correct order:

System.out.println("Loading nddscore");
System.loadLibrary("nddscore");
System.out.println("Loading nddsc");
System.loadLibrary("nddsc");
System.out.println("Loading nddsjava");
System.loadLibrary("nddsjava");