nvdweem / libjahspotify

Java wrapper for libspotify. Based on Jah'Spotify by Johan Lindquist.
29 stars 5 forks source link

UnsatisfiedLinkError: no jahspotify in java.library.path #10

Open jonasagx opened 9 years ago

jonasagx commented 9 years ago

I built the lib and am using it as a part of my local maven repo, and when I run the code example from README an exception is raised:

Oct 02, 2015 11:54:11 AM jahspotify.JahSpotifyNativeLoader <init>
WARNING: Unable to load stream for libspotify.so
Oct 02, 2015 11:54:11 AM jahspotify.impl.JahSpotifyImpl <clinit>
WARNING: The native-jar was not found or could not load the required libraries. Trying to load jahspotify without it.
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jahspotify in java.library.path

I don't know how to solve it, and as there is no documentation covering pom.xml configuration many others might have the same issue.

nvdweem commented 9 years ago

I expect that the native loader didn't pack the libspotify.so library in the jar. Did you set the LIB_SPOTIFY environment variable correctly? It should be set to the unpacked libspotify root folder (the folder that contains "lib/libspotify.so").