I am working on lemur tool and i am running with some problem.
when i execute the code , java complains
Exception in thread "main" java.lang.UnsatisfiedLinkError: no indri_jni in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at lemurproject.indri.indriJNI.<clinit>(indriJNI.java:109)
at lemurproject.indri.IndexEnvironment.<init>(IndexEnvironment.java:39)
at indritest.main(indritest.java:9)
this is My code
import lemurproject.indri.*;
public class indritest
{
public static void main ( String[] args )
{
try {
String [] stopwords = {"a", "an", "the", "of"};
IndexEnvironment env = new IndexEnvironment();
env.setStoreDocs(true);
env.setStopwords(stopwords);
env.create("aaa");
env.addFile("trekfile.txt", "booomer.txt");
env.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
I am using jdk 1.8.0_11 x64bit , windows 7 ultimate x64bit , indri5.7 x64bit , eclipse juno x64bit.
..................................................................................................................................................................... EDIT:-
I worked with the solution given by RALF WAGNER now my console is showing this Bug. after printed the System.getProperty("java.library.path") in my console i am getting this output. indri_jni.dll is already present in system32 folder.
My code.
import lemurproject.indri.*;
public class indritest
{
public static void main ( String[] args )
{
try {
System.out.println(System.getProperty("java.library.path"));
//System.loadLibrary("indri_jni");
String [] stopwords = {"a", "an", "the", "of"};
IndexEnvironment env = new IndexEnvironment();
env.setStoreDocs(true);
env.setStopwords(stopwords);
env.create("aaa");
env.addFile("trekfile.txt", "booomer.txt");
env.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
My console outout.
C:\Program Files\Java\jdk1.8.0_11\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\DMIX;C:\Program Files\Indri\Indri 5.7\bin;C:\Program Files\Java\jdk1.8.0_11\bin;.
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Program Files\Indri\Indri 5.7\bin\indri_jni.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1847)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1119)
at lemurproject.indri.indriJNI.<clinit>(indriJNI.java:109)
at lemurproject.indri.IndexEnvironment.<init>(IndexEnvironment.java:39)
at indritest.main(indritest.java:10)