0

Similar question: UnsatisfiedLinkError for com.aldebaran.qi - but refers to using naoqi java SDK on Android.

Initial Situation

Up to now I only used the naoqi Java SDK for our Nao Robot in Linux within Eclipse and via Terminal. I'm supposed to use the Java SDK for a project at my university in Eclipse on Windows 10.

Currently I have only the following SDK file by Aldebaran / Softbank (since the new Softbank Developer Page was started and the old Aldebaran Community page was shut down there is no download for the Java SDK):

  • java-naoqi-sdk-2.1.4.13-win32-vs2010.jar

I have added the SDK .jar file as an external jar in Eclipse as shown in the screenshot below:

screenshot of build path configuration in eclipse 2020

I'm using JDK 1.7.0 32bit as suggested by the Aldebaran documentation http://doc.aldebaran.com/2-1/dev/java/index_java.html

The Error

The program just compiles as normal - but when trying to connect to the robot, the program crashes while loading necessary libraries:

Loading gnustl_shared.dll
No such resource /gnustl_shared.dll
Loading gnustl_shared_d.dll
No such resource /gnustl_shared_d.dll
Loading boost_atomic.dll
No such resource /boost_atomic.dll
Loading boost_atomic_d.dll
No such resource /boost_atomic_d.dll
Loading boost_date_time.dll
No such resource /boost_date_time.dll
Loading boost_date_time_d.dll
No such resource /boost_date_time_d.dll
Loading boost_system.dll
No such resource /boost_system.dll
Loading boost_system_d.dll
No such resource /boost_system_d.dll
Loading boost_thread.dll
No such resource /boost_thread.dll
Loading boost_thread_d.dll
No such resource /boost_thread_d.dll
Loading boost_chrono.dll
No such resource /boost_chrono.dll
Loading boost_chrono_d.dll
No such resource /boost_chrono_d.dll
Loading boost_locale.dll
No such resource /boost_locale.dll
Loading boost_locale_d.dll
No such resource /boost_locale_d.dll
Loading boost_filesystem.dll
No such resource /boost_filesystem.dll
Loading boost_filesystem_d.dll
No such resource /boost_filesystem_d.dll
Loading boost_program_options.dll
No such resource /boost_program_options.dll
Loading boost_program_options_d.dll
No such resource /boost_program_options_d.dll
Loading boost_regex.dll
No such resource /boost_regex.dll
Loading boost_regex_d.dll
No such resource /boost_regex_d.dll
Loading qi.dll
Loading: C:\Users\lukas\AppData\Local\Temp\\qi.dll 
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: C:\Users\bruno\AppData\Local\Temp\qi.dll: Can't find dependent libraries
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1928)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1825)
    at java.lang.Runtime.load0(Runtime.java:792)
    at java.lang.System.load(System.java:1059)
    at com.aldebaran.qi.SharedLibrary.extractAndLoad(SharedLibrary.java:133)
    at com.aldebaran.qi.SharedLibrary.loadLibHelper(SharedLibrary.java:72)
    at com.aldebaran.qi.SharedLibrary.loadLib(SharedLibrary.java:34)
    at com.aldebaran.qi.EmbeddedTools.loadEmbeddedLibraries(EmbeddedTools.java:125)
    at com.aldebaran.qi.Application.<clinit>(Application.java:16)
    at action.RobotAction.connect(RobotAction.java:77)
    at ui.Connect$1.actionPerformed(Connect.java:49)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    at java.awt.Component.processMouseEvent(Component.java:6504)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
    at java.awt.Component.processEvent(Component.java:6269)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4860)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4686)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2713)
    at java.awt.Component.dispatchEvent(Component.java:4686)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
    at java.awt.EventQueue.access$000(EventQueue.java:101)
    at java.awt.EventQueue$3.run(EventQueue.java:666)
    at java.awt.EventQueue$3.run(EventQueue.java:664)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:680)
    at java.awt.EventQueue$4.run(EventQueue.java:678)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

The library files are contained in the .jar file. For linux these libraries are *.so files and for windows *.dll files. So I checked if all library files from the console output are contained in the .jar file. But most of the library files are missing (gnustl_shared.dll, boost_atomic.dll, ...):

content of the sdk.jar file

Am I doing something completely wrong?

  • I just ran into a similar issue. All the libs are available for the linux .jar (.so) but only a few for windows .jar (.dll). But actually the qi.dll is available. Did you ever manage to make it run under windows? – user2267367 Aug 17 '23 at 16:02

1 Answers1

0

Your JVM is perhaps supporting 64-bits only. Since only the 32-bits .jar is available, and according to Running 32-bit dll on 64-bit machine in java, you must use a 32-bits JVM to make it work.

Victor Paléologue
  • 2,025
  • 1
  • 17
  • 27