1

For a sandbox project https://github.com/PaulVI/NashornSandbox

I am trying to run helloWorld.js Node.js on Java 8 Nashorn with Avatar.js on Windows like

"C:\Program Files\Java\jdk1.8.0\bin\java" -Djava.library.path=lib -jar lib/avatar-js.jar helloWorld.js

and get "no avatar-js in java.library.path", while it is.

D:\Workspaces\Enide-Studio-2014-011-win64\NashornSandbox>"C:\Program Files\Java\jdk1.8.0\bin\java" -Djava.library.path=lib -jar lib/avatar-js.jar helloWorld.js
Exception in thread "main" java.lang.UnsatisfiedLinkError: no avatar-js in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1838)
        at java.lang.Runtime.loadLibrary0(Runtime.java:870)
        at java.lang.System.loadLibrary(System.java:1116)
        at com.oracle.libuv.LibUV.<clinit>(LibUV.java:33)
        at com.oracle.avatar.js.eventloop.EventLoop.<init>(EventLoop.java:397)
        at com.oracle.avatar.js.Server.<init>(Server.java:158)
        at com.oracle.avatar.js.Server.<init>(Server.java:137)
        at com.oracle.avatar.js.Server.<init>(Server.java:125)
        at com.oracle.avatar.js.Server.main(Server.java:121)

Paul Verest
  • 60,022
  • 51
  • 208
  • 332
  • I see "libavatar-js.dll", not "avatar-js.dll". Are you positive you need the `lib` prefix on Windows? I've never seen that convention used outside of *nix. – Marko Topolnik Apr 17 '14 at 10:27

1 Answers1

2

Marko is right, renaming to avatar-js.dll and avatar-js-win-x64.dll makes it run on Windows.

DJCordhose
  • 148
  • 1
  • 1
  • 5
  • I also added a script to that repository to make the sample server run on windows (run-avatar-sample-server.cmd) – DJCordhose Apr 17 '14 at 15:25