Nutch报错Error: JAVA_HOME is not set

来源:互联网 发布:pe软件下载 编辑:程序博客网 时间:2024/05/16 19:14

按照前辈的文章http://blog.csdn.net/zjzcl/article/details/593138,运行了一下nutch,但 在cygwin上运行nutch-1.2报错!

生成的crawl.log 中 Error: JAVA_HOME is not set

原因环境变量没有配好。

以我电脑为例配置NUTCH_JAVA_HOME为C:\Program Files\Java\jdk1.6.0_24 。注意不用加什么引号之类的。

重启cygwin即可!

 

接下来还会抛错:

生成的crawl.log 中 No agents listed in ‘http.agent.name’

原因在于conf/nutch-site.xml 文件<value></value>中的值为空,自己加上一些东西(我想应该是随意的),改成如下所示:

<property>
    <name>http.agent.name</name>
    <value>xhyzfl</value>
</property>


即可。


 

原创粉丝点击