Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

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

 
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?
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • 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
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • 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.
 
money grubbing section goes here:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic