Home > programming > Lucene 3.6.0 on Windows 7

Lucene 3.6.0 on Windows 7


C:\VictorProgramFiles\lucene-3.6.0\contrib\demo>java -classpath C:\VictorProgram

Files\lucene-3.6.0\lucene-core-3.6.0.jar;lucene-core-3.6.0-javadoc.jar;C:\Victor
ProgramFiles\lucene-3.6.0\contrib\demo\lucene-demo-3.6.0.jar;lucene-demo-3.6.0-j
avadoc.jar org.apache.lucene.demo.IndexFiles -docs ./src
Indexing to directory ‘index’…
adding .\src\test\org\apache\lucene\demo\test-files\docs\apache1.0.txt
adding .\src\test\org\apache\lucene\demo\test-files\docs\apache1.1.txt
adding .\src\test\org\apache\lucene\demo\test-files\docs\apache2.0.txt
adding .\src\test\org\apache\lucene\demo\test-files\docs\cpl1.0.txt
adding .\src\test\org\apache\lucene\demo\test-files\docs\epl1.0.txt
adding .\src\test\org\apache\lucene\demo\test-files\docs\freebsd.txt
adding .\src\test\org\apache\lucene\demo\test-files\docs\gpl1.0.txt
adding .\src\test\org\apache\lucene\demo\test-files\docs\gpl2.0.txt
adding .\src\test\org\apache\lucene\demo\test-files\docs\gpl3.0.txt
adding .\src\test\org\apache\lucene\demo\test-files\docs\lgpl2.1.txt
adding .\src\test\org\apache\lucene\demo\test-files\docs\lgpl3.txt
adding .\src\test\org\apache\lucene\demo\test-files\docs\lpgl2.0.txt
adding .\src\test\org\apache\lucene\demo\test-files\docs\mit.txt
adding .\src\test\org\apache\lucene\demo\test-files\docs\mozilla1.1.txt
adding .\src\test\org\apache\lucene\demo\test-files\docs\mozilla_eula_firefox3.t
xt
adding .\src\test\org\apache\lucene\demo\test-files\docs\mozilla_eula_thunderbir
d2.txt
1423 total milliseconds

C:\VictorProgramFiles\lucene-3.6.0\contrib\demo>java -classpath C:\VictorProgram
Files\lucene-3.6.0\lucene-core-3.6.0.jar;lucene-core-3.6.0-javadoc.jar;C:\Victor
ProgramFiles\lucene-3.6.0\contrib\demo\lucene-demo-3.6.0.jar;lucene-demo-3.6.0-j
avadoc.jar org.apache.lucene.demo.SearchFiles
Enter query:
computer
Searching for: computer
7 total matching documents
1. .\src\test\org\apache\lucene\demo\test-files\docs\mozilla_eula_firefox3.txt
2. .\src\test\org\apache\lucene\demo\test-files\docs\mozilla_eula_thunderbird2.t
xt
3. .\src\test\org\apache\lucene\demo\test-files\docs\mozilla1.1.txt
4. .\src\test\org\apache\lucene\demo\test-files\docs\lgpl3.txt
5. .\src\test\org\apache\lucene\demo\test-files\docs\apache2.0.txt
6. .\src\test\org\apache\lucene\demo\test-files\docs\gpl3.0.txt
7. .\src\test\org\apache\lucene\demo\test-files\docs\lgpl2.1.txt
Press (q)uit or enter number to jump to a page.

Here is also the wrong command:

C:\VictorProgramFiles\lucene-3.6.0\contrib\demo>java -classpath lucene-demo-3.6.
0.jar org.apache.lucene.demo.IndexFiles -docs ./src
Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/lucene/doc
ument/Fieldable
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.document.Fieldabl
e
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.apache.lucene.demo.IndexFiles. Program will
exit.

Advertisements
Categories: programming
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: