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

  • SEARCH
  • Home
  • 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 3983860
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:41:59+00:00 2026-05-20T05:41:59+00:00

To compile my java app, I use from terminal: javac -cp commons-digester-2.1/commons-digester-2.1.jar:lucene-core-3.0.3.jar CollectionIndexer.java To

  • 0

To compile my java app, I use from terminal:

javac -cp commons-digester-2.1/commons-digester-2.1.jar:lucene-core-3.0.3.jar CollectionIndexer.java

To run the app I use:

java -classpath commons-digester-2.1/commons-digester-2.1.jar:lucene-core-3.0.3.jar CollectionIndexer

However I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: commons-digester-2/1/commons-digester-2/1/jar:lucene-core-3/0/3/jar
Caused by: java.lang.ClassNotFoundException: commons-digester-2.1.commons-digester-2.1.jar:lucene-core-3.0.3.jar
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

I guess I’m defining correctly the classpath.. or what ?

  • 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-05-20T05:42:00+00:00Added an answer on May 20, 2026 at 5:42 am

    Try -cp instead of classpath. Also add the current directory to the classpath.

    $ java -cp .:commons-digester-2.1/commons-digester-2.1.jar:lucene-core-3.0.3.jar CollectionIndexer
    

    or

    $ export CLASSPATH=.:commons-digester-2.1/commons-digester-2.1.jar:lucene-core-3.0.3.jar
    $ java CollectionIndexer
    

    If on Windows, use backslashes and a semi-colon separator:

    java -cp .;commons-digester-2.1\commons-digester-2.1.jar;lucene-core-3.0.3.jar CollectionIndexer
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I compile my file with javac myfile.java But when I run myfile.class file with
When I tried to compile (use javac)some java sources files include a comment line
I have a java app, and the log4j.properties file is in src/com/my/path/props. On compile,
I am trying to compile and run a simple java class within eclipse. The
How do I compile and run a program in Java on my mac? I'm
I'm trying to build my Flex/Java web app from within IntelliJ rather than have
I have a Java app that use a bunch of JNI calls to execute
I want to compile some .java files into a JAR. I would like to
I'm writing a Java app that will let me compile a Java project based
I am trying to compile two java programs in Eclipse on Ubuntu. I then

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.