当前位置: 动力学知识库 > 问答 > 编程问答 >

java - I have installed lucene, but could not import it in class

问题描述:

I have installed lucene, as it written in BUILD.txt. Building output:

 Buildfile: /home/ali/Downloads/lucene-3.6.1/build.xml

check-lucene-core-uptodate:

compile-lucene-core:

jflex-uptodate-check:

jflex-notice:

[echo]

[echo] One or more of the JFlex .jflex files is newer than its corresponding

[echo] .java file. Run the "jflex" target to regenerate the artifacts.

[echo]

javacc-uptodate-check:

javacc-notice:

ivy-availability-check:

ivy-fail:

resolve:

[ivy:retrieve] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::

[ivy:retrieve] :: loading settings :: url = jar:file:/home/ali/.ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml

init:

clover.setup:

clover.info:

[echo]

[echo] Clover not found. Code coverage reports disabled.

[echo]

clover:

common.compile-core:

[mkdir] Created dir: /home/ali/Downloads/lucene-3.6.1/build/core/classes/java

[javac] Compiling 503 source files to /home/ali/Downloads/lucene-3.6.1/build/core/classes/java

[javac] /home/ali/Downloads/lucene-3.6.1/core/src/java/org/apache/lucene/queryParser/CharStream.java:50: warning: [dep-ann] deprecated item is not annotated with @Deprecated

[javac] int getEndColumn();

[javac] ^

[javac] /home/ali/Downloads/lucene-3.6.1/core/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java:441: warning: [cast] redundant cast to int

[javac] int hiByte = (int)(curChar >> 8);

[javac] ^

[javac] /home/ali/Downloads/lucene-3.6.1/core/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java:691: warning: [cast] redundant cast to int

[javac] int hiByte = (int)(curChar >> 8);

[javac] ^

[javac] /home/ali/Downloads/lucene-3.6.1/core/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java:798: warning: [cast] redundant cast to int

[javac] int hiByte = (int)(curChar >> 8);

[javac] ^

[javac] /home/ali/Downloads/lucene-3.6.1/core/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java:969: warning: [cast] redundant cast to int

[javac] int hiByte = (int)(curChar >> 8);

[javac] ^

[javac] Note: Some input files use or override a deprecated API.

[javac] Note: Recompile with -Xlint:deprecation for details.

[javac] 5 warnings

compile-core:

jar-core:

jflex-uptodate-check:

jflex-notice:

[echo]

[echo] One or more of the JFlex .jflex files is newer than its corresponding

[echo] .java file. Run the "jflex" target to regenerate the artifacts.

[echo]

javacc-uptodate-check:

javacc-notice:

ivy-availability-check:

ivy-fail:

resolve:

[ivy:retrieve] :: loading settings :: url = jar:file:/home/ali/.ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml

init:

clover.setup:

clover.info:

[echo]

[echo] Clover not found. Code coverage reports disabled.

[echo]

clover:

common.compile-core:

compile-core:

jar-core:

[jar] Building jar: /home/ali/Downloads/lucene-3.6.1/build/core/lucene-core-3.6.1-SNAPSHOT.jar

default:

BUILD SUCCESSFUL

Total time: 10 seconds

But when I want to import it to the class in Eclipse, I don't see any lucene option there.

For example, I would like to import

import org.apache.lucene.analysis.standard.StandardAnalyzer

Eclipse shows error that there is no such library. What is the problem?

分享给朋友:
您可能感兴趣的文章:
随机阅读: