运行Lucene示例时编译失败

编程入门 行业动态 更新时间:2024-10-27 14:24:04
本文介绍了运行Lucene示例时编译失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

修复了诸如tools.jar和junit.jar之类的错误后,由于堆栈溢出,我尝试编译"lucene in action"一书中给出的示例.但是当我编译时,我得到了这个错误.你能告诉我我遇到什么错误以及如何解决吗?

After fixing the error like tools.jar and junit.jar not found (thanks to stack overflow) I tried to compile the example given in "lucene in action" book. But when I compiled I am getting this error. Can you tell what error I am getting and how to fix it?

Total time: 0 seconds E:\LuceneInAction>ant Indexer Buildfile: E:\LuceneInAction\build.xml check-environment: compile: [javac] E:\LuceneInAction\build.xml:66: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [javac] Compiling 104 source files to E:\LuceneInAction\build\classes [javac] E:\LuceneInAction\src\lia\analysis\AnalyzerUtils.java:3: warning: [d eprecation] Assert in junit.framework has been deprecated [javac] import junit.framework.Assert; [javac] ^ [javac] E:\LuceneInAction\src\lia\handlingtypes\html\NekoHTMLHandler.java:18 : error: package org.apache.html.dom does not exist [javac] import org.apache.html.dom.HTMLDocumentImpl; [javac] ^ [javac] E:\LuceneInAction\src\lia\analysis\AnalyzerUtils.java:90: warning: [ deprecation] Assert in junit.framework has been deprecated [javac] Assert.assertEquals(strings.length, tokens.length); [javac] ^ [javac] E:\LuceneInAction\src\lia\analysis\AnalyzerUtils.java:93: warning: [ deprecation] Assert in junit.framework has been deprecated [javac] Assert.assertEquals("index " + i, strings[i], tokens[i].termTe xt()); [javac] ^ [javac] E:\LuceneInAction\src\lia\handlingtypes\html\NekoHTMLHandler.java:32 : error: cannot find symbol [javac] new HTMLDocumentImpl().createDocumentFragment(); [javac] ^ [javac] symbol: class HTMLDocumentImpl [javac] location: class NekoHTMLHandler [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 2 errors [javac] 3 warnings BUILD FAILED E:\LuceneInAction\build.xml:66: Compile failed; see the compiler error output fo r details. Total time: 2 seconds

对不起,我没有足够的声誉来发表图片

Sorry I dont have enough reputaion to post image

推荐答案

Tt抱怨您的jar包含HtmlDocumentImpl,而不在classpath上.也许xerces?特定版本. JUnit是来自org.framework的Assert的警告.您可以更新您的JUnit jar文件,也可以保留它,因为这不是导致错误的原因.

Tt is complaining about your jar which contains HtmlDocumentImpl not being on the classpath. Maybe xerces? A specific version. The JUnits are a warning that it the Assert which comes from org.framework. You can update your JUnit jar file or leave it as is since that isnt the cause of the error.

错误是由于jar不在您的类路径中引起的.我猜是xerces

The errors are due to a jar not being on your classpath. which in my guess is xerces

更多推荐

运行Lucene示例时编译失败

本文发布于:2023-11-23 08:53:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1620832.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:示例   Lucene

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!