• Post Reply Bookmark Topic Watch Topic
  • New Topic

Classpath includes JAR file, so what's the problem?  RSS feed

 
Marvin Humphrey
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greets,

I'm fluent in several other programming languages, and I've ported a huge
project from Java to C/Perl (Apache Lucene => KinoSearch), so I understand
Java reasonably well on a theoretical level. However, since I've never used
Java to build anything professionally, my practical knowledge is rudimentary
at best.

Right now, my goal is to benchmark a patch against the Apache Lucene library.
Here's a high level summary that illustrates where I've gotten to.

In other words, I can make my changes to the library (including new JUnit test
cases) and get "ant test" to run successfully.

The next step is to run the benchmark. According to the javadocs
(http://lucene.apache.org/java/2_4_0/api/contrib-benchmark/org/apache/lucene/benchmark/byTask/Benchmark.html), the
proper command line incantation is: "java Benchmark algorithm-file".

So... I build both the core library and "contrib/benchmark", set my CLASSPATH,
and attempt to run one of the algorithm files:

The output seems obviously indicative of a classpath problem.


I must be making an elementary mistake. What is it?

I've read the FAQ on CLASSPATH and the Sun documentation, and specifying the
full path to the JAR ought to do the trick, right?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I looked at the Javadoc link you provided -- thanks, that makes it easy.

The class is named "org.apache.lucene.benchmark.byTask.Benchmark", so to run it -- despite what the Javadoc says -- you actually have to say



 
Marvin Humphrey
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, that did the trick. I'm now getting errors I know how to solve.
 
Marvin Humphrey
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should I point out this documentation glitch to the Lucene dev list? Is there any situation under which the documented form could work correctly?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marvin Humphrey wrote:Should I point out this documentation glitch to the Lucene dev list? Is there any situation under which the documented form could work correctly?


No, that would never be the correct command line; you can confidently report this as a doc error.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!