NoClassDefFoundError msg

I have and under c:\src\dkim18\crawler\ and I have WebCrawler.class and CrawlerExcpetion.class under c:\classes\dkim18\crawler\. When I run this program under c:\classes\dkim18\crawler\ dir, I have the following error msg:

Exception in thread “main” java.lang.NoClassDefFoundError: c:\classes\dkim18\crawler\

Why am I having this error?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Have you compiled all the classes?
Please post the full error message too:

>>Exception in thread “main” java.lang.NoClassDefFoundError:

misses out the most important piece of info (the class name)
Mick BarryJava DeveloperCommented:
Ensure c:\classes is in your classpath, and you are specifying the full classname:

java dkim18.crawler.WebCrawler
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Mick BarryJava DeveloperCommented:
or you can specify the classpath on the command line:

java c:\classes;%classpath% dkim18.crawler.WebCrawler
dkim18Author Commented:
Have you compiled all the classes?

Please post the full error message too:
>>Exception in thread “main” java.lang.NoClassDefFoundError: c:\classes\dkim18\crawler\

when I run this :
javac -d classes -sourcepath src -classpath classes src\dkim18\crawler\

I got class files under c:\classes\dkim18\crawler\ and run program in this dir.
Mick BarryJava DeveloperCommented:
> javac -d classes -sourcepath src -classpath classes src\dkim18\crawler\

A lot easier to compile from the same directory as the source files :)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
move to directory ..\src and type this command

java -cp "."
Mick BarryJava DeveloperCommented:
As i mentioned above:

java c:\classes;%classpath% dkim18.crawler.WebCrawler

will work from any directory.
Running with this command line:

>>java c:\classes;%classpath% dkim18.crawler.WebCrawler

Will mean that your source file for WebCrawler should start with

package dkim18.crawler;
Mick BarryJava DeveloperCommented:
pretty sure it already does, but if theres a problem it can be dealt with when this problem is solved.
Mick BarryJava DeveloperCommented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.