Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8549133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:39:20+00:00 2026-06-11T13:39:20+00:00

I am new to java and have used it in netBeans but have never

  • 0

I am new to java and have used it in netBeans but have never tried to compile or run it from terminal. So, my question may look naive. I have a directory of this structure:

Folder X contains:
couple of files and a folder named esa-lucene.

esa-lucene is a directory having three folders src, lib, web:

.classpath, lib, .project, .settings, src, web

and I am trying to run a java file ” ESAWikipediaIndexer.java” which exists in this subdirectory:

X/esa-lucene/src/edu/wiki/index/ESAWikipediaIndexer.java

I cd into Folder X and use this:

java -cp esa-lucene.jar edu.wiki.index.ESAWikipediaIndexer

But it gives me this error:

Exception in thread "main" java.lang.NoClassDefFoundError: edu/wiki/index/ESAWikipediaIndexer
Caused by: java.lang.ClassNotFoundException: edu.wiki.index.ESAWikipediaIndexer
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: edu.wiki.index.ESAWikipediaIndexer. Program will exit.

also I’ve checked .classpath and it contains:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    <classpathentry kind="lib" path="lib/servlet-api.jar"/>
    <classpathentry kind="lib" path="web/WEB-INF/lib/lucene-analyzers-3.0.0.jar"/>
    <classpathentry kind="lib" path="web/WEB-INF/lib/lucene-core-3.0.0.jar"/>
    <classpathentry kind="lib" path="web/WEB-INF/lib/mysql-connector-java-5.1.12-bin.jar"/>
    <classpathentry kind="lib" path="web/WEB-INF/lib/trove-2.1.0.jar"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

I’ve checked the lib and web/WEB-INF/lib/ folders as well and all the required external libraries (jar files) also exist in this folder.

I searched to find any solution and tried a couple of things but none of them worked. Have no clue how to make it work!

BTW, apparently people have used this package before, and I just downloaded to use it too but wasn’t successful so far.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:39:21+00:00Added an answer on June 11, 2026 at 1:39 pm

    Looks like you are referring to Eclipse classpath and .project files. That being the case why dont you try running it in eclipse.

    However since here you are running it manually the classpath entries in classpath file are not being used. Also can you tell us where the .class file for the ESAWikipediaIndexer.java. If you run the below command

    java -cp */esa-lucene.jar edu.wiki.index.ESAWikipediaIndexer

    From the directory where it is located, it should work.
    Also you need to provide full path or relative path to esa-lucene.jar in the above command.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to Java (and Eclipse) but I have used .NET (and Visual
I am used to Java and new to QT/C++, and I have some problems
I have created a sample java socket application. I used Socket s = new
Forgive me, I'm new to Java and have an extremely basic question. I have
I am new to Struts so I have a simple question. On LoginAction.java I
I have developed Java desktop application using Netbeans. In my application, I used some
I have to call SharePoint 2010 Lists service from a Java client. I used
I am new to Java. I just read that class variables in Java have
I'm new to Java and have gotten myself into a situation where it's evident
I am new in Java and have got as a task to find out,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.