0

I'm trying to run the Node.js application on JVM. I'm following this tutorial: http://blog.jonasbandi.net/2014/03/running-nodejs-applications-on-jvm-with.html. But when I'm trying to execute it on macOS High Sierra 10:13:6, getting the error.UnsatisfiedLinkError: no avatar-js in java.library.path.

Here dist is containing 3 files. 1.app.js(myApplication) 2.avatar-js.dylib 3.avatar-js.jar

The command I'm using for this on my terminal is:

java -Djava.library.path=dist -jar dist/avatar-js.jar app.jar

Exception occurred:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no avatar-js 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.oracle.libuv.LibUV.<clinit>(LibUV.java:33)
at com.oracle.avatar.js.Server.<init>(Server.java:166)
at com.oracle.avatar.js.Server.<init>(Server.java:140)
at com.oracle.avatar.js.Server.<init>(Server.java:128)
at com.oracle.avatar.js.Server.main(Server.java:122)

Expected output: Server running at http://127.0.0.1:8000/

  • Can someone look into this issue, please? I have spent more than 20 hours in figuring out the solution but couldn't get any as of now. I have provided all the permission to my file but still, it is not working. – shailjakant Jul 11 '19 at 10:09
  • Make sure to give it a proper name: avatar-js.dylib -> libavatar-js.dylib. "no avatar-js" is little bit misleading. Name of the lib is: libNAME.dylib – Oo.oO Jul 12 '19 at 07:13
  • Thank you so much man, it is working fine. So it was happening because of naming illusions. – shailjakant Jul 12 '19 at 10:25
  • Yes. Names of all libs have format "libNAME.dylib" but you say that lib name is "NAME" :) – Oo.oO Jul 12 '19 at 10:54

0 Answers0