如何在类路径中包含多个类文件和 .Jar 文件,我在 linux 上 .. 并且想将下载的 lucene 包与我的代码集成,所有库和类文件都在 lucene 目录中。(它们是该文件夹内的多个子目录)?
HelloLucene.java:1: error: package org.apache.lucene.analysis.standard does not exist
import org.apache.lucene.analysis.standard.StandardAnalyzer;
^
HelloLucene.java:10: error: package org.apache.lucene.queryparser.classic does not exist
import org.apache.lucene.queryparser.classic.ParseException;
^
HelloLucene.java:11: error: package org.apache.lucene.queryparser.classic does not exist
import org.apache.lucene.queryparser.classic.QueryParser;
^
HelloLucene.java:23: error: cannot find symbol
public static void main(String[] args) throws IOException, ParseException {
^
symbol: class ParseException
location: class HelloLucene
HelloLucene.java:26: error: cannot find symbol
StandardAnalyzer analyzer = new StandardAnalyzer(Version.LUCENE_40);
^
symbol: class StandardAnalyzer
location: class HelloLucene
HelloLucene.java:26: error: cannot find symbol
StandardAnalyzer analyzer = new StandardAnalyzer(Version.LUCENE_40);
^
symbol: class StandardAnalyzer
location: class HelloLucene
HelloLucene.java:45: error: cannot find symbol
Query q = new QueryParser(Version.LUCENE_40, "title", analyzer).parse(querystr);
^
symbol: class QueryParser
location: class HelloLucene
Note: HelloLucene.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
7 errors