processing-sound-archive icon indicating copy to clipboard operation
processing-sound-archive copied to clipboard

Exported applications cannot find MethClaInterface on OS X

Open codeanticode opened this issue 9 years ago • 4 comments

I exported the Sample example from release 1.3 of the library, on Processing 3.0b5 and Mac OS X 10.9.5. When I try to run it from the command line I get this error:

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: no MethClaInterface in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at processing.sound.MethClaInterface.<clinit>(Unknown Source)
    at processing.sound.Engine.<init>(Unknown Source)
    at processing.sound.Engine.<init>(Unknown Source)
    at processing.sound.Engine$LazyHolder.<clinit>(Unknown Source)
    at processing.sound.Engine.start(Unknown Source)
    at processing.sound.SoundFile.<init>(Unknown Source)
    at Sample.setup(Sample.java:33)
    at processing.core.PApplet.handleDraw(PApplet.java:2376)
    at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1499)
    at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:312)

codeanticode avatar Sep 01 '15 14:09 codeanticode

I can’t seem to reproduce the problem, works like a charm here. Will try on some other machines but the error indicates that the JNILib is not found. Would you mind sending me your exported application?

Thanks!! Wilm

On 01.09.2015, at 07:36, codeanticode [email protected] wrote:

I exported the Sample example from release 1.3 of the library, on Processing 3.0b5 and Mac OS X 10.9.5. When I try to run it from the command line I get this error:

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: no MethClaInterface in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at processing.sound.MethClaInterface.(Unknown Source) at processing.sound.Engine.(Unknown Source) at processing.sound.Engine.(Unknown Source) at processing.sound.Engine$LazyHolder.(Unknown Source) at processing.sound.Engine.start(Unknown Source) at processing.sound.SoundFile.(Unknown Source) at Sample.setup(Sample.java:33) at processing.core.PApplet.handleDraw(PApplet.java:2376) at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1499) at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:312) — Reply to this email directly or view it on GitHub https://github.com/processing/processing-sound/issues/44.

wirsing avatar Sep 26 '15 05:09 wirsing

Any chance this has been resolved? I'm having the same problem while trying to use the library in an Eclipse project. I've added the library to the build path and copied os-specific folders into the same place as the .jar, but it can't seem to find the files it needs.

riebschlager avatar Oct 19 '15 19:10 riebschlager

I'm having the same issue on Linux 64 bit on Eclipse. Also added library and os-specific folders but does not help.

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: no MethClaInterface 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 processing.sound.MethClaInterface.<clinit>(Unknown Source)
    at processing.sound.Engine.<init>(Unknown Source)
    at processing.sound.Engine.<init>(Unknown Source)
    at processing.sound.Engine$LazyHolder.<clinit>(Unknown Source)
    at processing.sound.Engine.start(Unknown Source)
    at processing.sound.AudioDevice.<init>(Unknown Source)

hamoid avatar May 05 '16 17:05 hamoid

I just ran into this error while using Eclipse as well. Here's how I fixed it for my local environment, though I feel like other libraries with multi-platform binaries don't always need this step. Maybe there's some way to have the library find the platform-specific binaries on its own?

  • Add sound.jar to your build path
  • Right-click sound.jar in Eclipse's package explorer
  • Choose Build Path -> Configure Build Path
  • On the Libraries tab, find sound.jar and expand it using the arrow to the left
  • Select Native Library Location and click Edit on the right, then select the folder that contains your platform's binaries. For me it looked something like .../sound/library/macosx

cc/ @riebschlager & @hamoid

cacheflowe avatar May 31 '16 17:05 cacheflowe