[英]why some imports cannot be resolved?
I'm new to java , i tried to use word net for senitment analysis . 我是Java的新手,我曾尝试使用word net进行分析。 when i used class of wordnet , i got the following failure in importing
当我使用wordnet类时,导入失败
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Deactivate;
import org.apache.felix.scr.annotations.Reference;
import org.apache.lucene.analysis.en.EnglishMinimalStemmer;
import org.apache.stanbol.commons.stanboltools.datafileprovider.DataFileListener;
import org.apache.stanbol.commons.stanboltools.datafileprovider.DataFileTracker;
import org.apache.stanbol.enhancer.engines.sentiment.api.LexicalCategoryClassifier;
import org.apache.stanbol.enhancer.engines.sentiment.api.SentimentClassifier;
import org.apache.stanbol.enhancer.engines.sentiment.util.WordSentimentDictionary;
import org.apache.stanbol.enhancer.nlp.pos.LexicalCategory;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.component.ComponentContext;
all the above imports cannot be resolved like org.apache.felix
, org.apache.lucene
, org.apache.stanbol
, org.osgi
上述所有导入都无法解析,例如
org.apache.felix
, org.apache.lucene
, org.apache.stanbol
, org.osgi
This is because your compiler is not able to find the necessary packages and or libraries that are needed to resolve these imports. 这是因为您的编译器无法找到解决这些导入所需的必要包和/或库。 These packages must be included in your class path.
这些软件包必须包含在您的类路径中。 For example all of the errors regarding
例如,所有有关的错误
org.apache.felix.scr.annotations.x
can be resolved after downloading the latest .jar from https://mvnrepository.com/artifact/org.apache.felix/org.apache.felix.scr.annotations/1.11.0 从https://mvnrepository.com/artifact/org.apache.felix/org.apache.felix.scr.annotations/1.11.0下载最新的.jar后可以解决
Follow these steps to include jar files in your class path. 请按照以下步骤在您的类路径中包含jar文件。 -
--
These packages need to be within the compiler's class path. 这些软件包必须位于编译器的类路径中。
Another way to say it : the compiler needs to be able to know where to find these files. 换句话说,编译器需要知道在哪里可以找到这些文件。 This imposes several constraints:
这施加了一些约束:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.