Hi everyone,
My program in not running because of below error and I am using RHEL7 and Eclipse Mars. If anybody know about it please help me and thanks in advance.
The library libnddsjavad.so could not be loaded by Linux.
Make sure that the library is in your LD_LIBRARY_PATH environment variable.
Exception in Application init method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application init method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:912)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.UnsatisfiedLinkError: no nddsjavad in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at com.rti.dds.util.NativeInterface.loadNativeLibrary(Unknown Source)
at com.rti.dds.util.NativeInterface.loadNativeLibraries(Unknown Source)
at com.rti.dds.domain.DomainParticipantFactory.<clinit>(Unknown Source)
at iaccs.batch1.DDS.DDSManager.<init>(DDSManager.java:53)
at iaccs.batch1.DDS.DDSManager.getInstance(DDSManager.java:44)
at iaccs.batch1.MainApp.init(MainApp.java:46)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:841)
... 2 more
Exception running application iaccs.batch1.MainApp
Attachment | Size |
---|---|
error file | 2.07 KB |
Hello,
What jar file are you using? nddsjava.jar or nddsjavad.jar?
If you use the second one (nddsjavad.jar), i think it may try to load the debug version of the native libs (nddsjavad.so)..
Can you check and try to use nddsjava.jar instead?
Best,
Gianpiero
Hi,
You will need to add the LD_LIBRARY_PATH to your Run or Debug Configuration in Eclipse. To modify your Run or Debug configuration go to Run->(Run Configurations or Debug Configuration) and select the one you are launching. This will popup a dialog in which you can configure things like arguments, classpath, and environment variables for your application. In this case, you need to export the LD_LIBRARY_PATH environment variable; so click on Environment->New and enter:
Also, note that when you generate an example project using rtiddsgen as follows, it automatically creates an Eclipse project that you can import using File->Import and pointing to the folder where you have generated the example.
Please, let me know if this helps.
Fernando.
Hi Fernando Garcia,
Your solution is working for me. Thank you so much.
Hi gianpiero,
Actually i am using nddsjavad.jar file but solution given by Fernando Garcia is working for me. Thank you gianpiero for giving reply on my post.