我从这里下载了源代码 --> http://lucene.apache.org/core/4_5_1/demo/overview-summary.html
现在我进入了源文件IndexFiles.java,输入javac IndexFiles,但是我得到了一堆符号未找到的错误。为什么?我已经更改了我的classpath,并添加了目录中的所有*.jar文件。我可能错过了什么?我能够使用二进制文件并运行演示,但我想鼓捣演示并更改一些其行为,所以我想从源代码编译它。
当我输入
当我输入
javac IndexFiles.java
时,我会得到很多类似以下的错误:package org.apache.lucene.analysis does not exist
import org.apache.lucene.analysis.Analyzer;
^
IndexFiles.java:20: error: package org.apache.lucene.analysis.standard does not exist
import org.apache.lucene.analysis.standard.StandardAnalyzer;
^
IndexFiles.java:21: error: package org.apache.lucene.document does not exist
import org.apache.lucene.document.Document;
^
IndexFiles.java:22: error: package org.apache.lucene.document does not exist
import org.apache.lucene.document.Field;
^
IndexFiles.java:23: error: package org.apache.lucene.document does not exist
import org.apache.lucene.document.LongField;
^
IndexFiles.java:24: error: package org.apache.lucene.document does not exist
import org.apache.lucene.document.StringField;
^
IndexFiles.java:25: error: package org.apache.lucene.document does not exist
import org.apache.lucene.document.TextField;
^
IndexFiles.java:26: error: package org.apache.lucene.index does not exist
import org.apache.lucene.index.IndexWriter;
^
IndexFiles.java:27: error: package org.apache.lucene.index.IndexWriterConfig does not exist
import org.apache.lucene.index.IndexWriterConfig.OpenMode;
^
IndexFiles.java:28: error: package org.apache.lucene.index does not exist
import org.apache.lucene.index.IndexWriterConfig;
^
IndexFiles.java:29: error: package org.apache.lucene.index does not exist
import org.apache.lucene.index.Term;
^