0

I downloaded luke-1.0.1.jar (Luke 1.0.1 binary without any dependencies) from http://code.google.com/p/luke/downloads/list.

And I have WinXP, with latest Java 6 downloaded from Oracle/Sun web site.

I run the command line: "java -jar luke-1.0.1.jar" and try to launch Luke, but I got following error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/lucene/analysis/Analyzer
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.analysis.Analyzer
        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.getopt.luke.Luke. Program will exit.

Any clue, what shall I do? I totally have no knowledge of Java.

Thanks

Hardy

hardywang
  • 4,864
  • 11
  • 65
  • 101

3 Answers3

1

So Java complains that it cant find a dependency. Which is little surprise since you downloaded a binary without dependencies.

Download the binary with all the dependencies (try the "featured" one) and you should be good.

iluxa
  • 6,941
  • 18
  • 36
  • I think the version I downloaded is featured one. – hardywang Mar 12 '11 at 01:37
  • Judging from your description "Luke 1.0.1 binary without any dependencies" it's not the one – iluxa Mar 12 '11 at 01:40
  • All I can see from download page is either source code or binary. Fairly clearly on the page. I also downloaded lucene jar file, how can I make them run together? – hardywang Mar 12 '11 at 01:46
  • download the "self-contained..." thing. Third one in the list. This one: "lukeall-1.0.1.jar Release 1.0.1 self-contained executable JAR with plugins (uses Lucene 3.0.1) Featured" – iluxa Mar 12 '11 at 01:48
0

Luke is a tool for examining lucene indices. You need to combine it with Lucene. You can either download Lucene and add appropriare JAR files to the classpath, or download a fatter Luke binary that includes Lucene.

bmargulies
  • 97,814
  • 39
  • 186
  • 310
  • I copied Lucene jar file inside same folder of luke jar file, and run command "java -cp C:\Temp\Lucene\ -jar luke-1.0.1.jar", the same error. – hardywang Mar 12 '11 at 01:48
0

Use luke-all.jar instead,

http://code.google.com/p/luke/downloads/detail?name=lukeall-1.0.1.jar&can=2&q=

sbridges
  • 24,960
  • 4
  • 64
  • 71