Eclipse中编译Nutch-1.0
这次试验是关于Nutch网页抓取的,做了很长时间,也失败N多回,但是我必须通过这关才能继续学Luence,所以我一个人坚持三天了。苦心人天不负,终于还是让我完成了这个试验。
一个权威的文档包含了所有的过程,找到它真的是相见恨晚。Eclipse中编译Nutch-1.0 请到http://download.csdn.net/detail/las_vegas/4140727下载。
另外,还有jid3lib-0.5.1.jar,rtf-parser.jar,nutch-1.0.tar.gz,cygwin等相关软件,貌似nutch-1.0比较稀有,这里我给大家一个下载地址http://apache.etoak.ce/nutch/nutch-1.0.tar.gz(打开迅雷,新建—>复制网址—>继续)
其他的工作按照"Eclipse中编译Nutch-1.0“这个文档所说的做就是了,最后还要注意几个问题;
第一:Exception in thread "main" java.io.IOException: Job failed!
解决方案:nutch-default.xml //自己添加的时没有认真的原因造成的。
<property>
<name>plugin.folders</name>
<value>./src/plugins </value>
<description>Directories where nutch plugins are located. Each
element may be a relative or absolute path. If absolute, it is used
as is. If relative, it is searched for on the classpath.</description>
</property>
修改成:
<property> <name>plugin.folders</name> <value>./src/plugin</value> <description>Directories where nutch plugins are located. Each element may be a relative or absolute path. If absolute, it is used as is. If relative, it is searched for on the classpath.</description> </property>
第二:nutch Failed to get the current user’s information 'Login failed: Cannot run
解决方案:
这种错误,是nutch不能在window直接运费,得环境变量设置path指向cygwin(eg:C:\cygwin\bin),然后重启eclipse这样就可以ok地运行eclise
参数配置:
程序参数:urls -dir no -depth 3 -topN 30
虚拟机参数:-Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M
部分内容转自:http://nhy520.iteye.com/blog