本文转自百度知道:https://zhidao.baidu.com/question/502397085.html
按照网上看到的用法导入Heritrix到Eclipse。在Heritrix.java中间中提示有错误 只有这一个。
在Heritrix1.14.3配置运行时,出现Error:找不到sun.net.www.protocol.file.FileURLConnection,
原因是sun包是受保护的包,默认只有sun公司的软件才能使用,Eclipse使用则会报错,只需把对保护使用waring就可以了
具体的做法是:
Windows -> Preferences -> Java -> Compiler -> Errors/Warnings-> Deprecated and trstricted API -> Forbidden reference (access rules): -> change to warning