sdk icon indicating copy to clipboard operation
sdk copied to clipboard

[Linux, Java] Cannot even make the examples run. Unsatisfied link error: swig_module_init()V

Open Neeqstock opened this issue 8 years ago • 0 comments

My issue is similar to the A7F one, but I am reformulating it here because my procedure was different. I'm not using Maven nor using an IDE, I'm just following your instructions for Linux users to run the examples.

I am wondering what is the correct procedure to make a Java project in Linux work with MEGA API, I think we're losing something on the road, since I cannot even make the examples run.

My steps, trying to follow the instructions, are these:

  • System configuration:

_ XUbuntu Linux 16 _ SWIG 3.0.12 installed (compiled from the tar) _ Oracle Java 1.8.0

  • I compile the SDK as the main readme.md suggests
  • I compile the SDK with --enable-java as suggested in the readme.md of the samples, and I follow all the other steps in that readme.
  • When I run the java application, even from terminal, I get this:

java -cp bin nz.mega.bindingsample.SwingExample Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: nz.mega.sdk.megaJNI.swig_module_init()V at nz.mega.sdk.megaJNI.swig_module_init(Native Method) at nz.mega.sdk.megaJNI.(megaJNI.java:997) at nz.mega.sdk.MegaLogger.(MegaLogger.java:58) at nz.mega.sdk.DelegateMegaLogger.(DelegateMegaLogger.java:32) at nz.mega.sdk.MegaApiJava.setLoggerObject(MegaApiJava.java:1276) at nz.mega.bindingsample.SwingExample.initializeMegaApi(SwingExample.java:108) at nz.mega.bindingsample.SwingExample.(SwingExample.java:99) at nz.mega.bindingsample.SwingExample$2.run(SwingExample.java:289) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

How can we escape this problem?

Neeqstock avatar May 19 '17 10:05 Neeqstock