修复了诸如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示例时编译失败
发布评论