• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
author and iconoclast
Posts: 24203
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 24203
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic