Nutch problem: java.lang.NoClassDefFoundError

I'm trying to run Nutch on my Windows machine. I have Nutch, Java, Tomcat, and Cygwin installed. When I try to run the crawl command in Cygwin, I get the following error:

java.lang.NoClassDefFoundError: org/apache/nutch/crawl/Crawl
Caused by: java.lang.ClassNotFoundException: org.apache.nutch.crawl.Crawl
    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)
Could not find the main class: org.apache.nutch.crawl.Crawl.  Program will exit.
Exception in thread "main"

My Java is a bit rusty, but this seems to be telling me that the Crawl class doesn't exist. If this is the case, how do I go about finding it -- and making sure my system is aware of its existence?

Answers


You must add the nutch jar to your classpath. See here how

It appears that the nutch distribution does not ship with a jar. You have to build it yourself using the ant build.xml. Type ant jar in the nutch directory (if you have ant installed), and it will make the jar.


Need Your Help

Why do I get “Can't call method ”fetchrow_array“ without a package or object reference”?

perl dbd

I have installed DBD::Pg version 2.17.1 but still still getting error while using below code

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.