我从这里下载了源代码 --> http://lucene.apache.org/core/4_5_1/demo/overview-summary.html
现在我已经转到源文件 IndexFiles.java,然后键入 javac IndexFiles,但我得到一堆未找到符号的错误。为什么?我更改了类路径并在目录中添加了所有 *.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;
^