在Java中查找eclipse/jdt的jar依赖项
我正在尝试使用命令行进行编译 我根据EclipseIndigo中在Java中查找eclipse/jdt的jar依赖项,java,eclipse,jar,dependencies,eclipse-jdt,Java,Eclipse,Jar,Dependencies,Eclipse Jdt,我正在尝试使用命令行进行编译 我根据EclipseIndigo中plugins目录中的名称匹配生成了这个命令行 javac -cp .:\ org.eclipse.core.runtime_3.7.0.v20110110.jar:\ org.eclipse.equinox.common_3.6.0.v20110523.jar:\ org.eclipse.core.commands_3.6.0.I20110111-0800.jar:\ org.eclipse.core.resources_3.7.
plugins
目录中的名称匹配生成了这个命令行
javac -cp .:\
org.eclipse.core.runtime_3.7.0.v20110110.jar:\
org.eclipse.equinox.common_3.6.0.v20110523.jar:\
org.eclipse.core.commands_3.6.0.I20110111-0800.jar:\
org.eclipse.core.resources_3.7.100.v20110510-0712.jar:\
org.eclipse.jface.text_3.7.1.r371_v20110825-0800.jar:\
org.eclipse.jdt.core_3.7.1.v_B76_R37x.jar:\
org.eclipse.jdt_3.7.1.v201109091335.jar \
SampleHandler.java
问题是,我仍然得到这4个错误
SampleHandler.java:19: cannot find symbol
symbol : class Document
location: package org.eclipse.jface.text
import org.eclipse.jface.text.Document;
^
SampleHandler.java:28: cannot access org.eclipse.core.runtime.jobs.ISchedulingRule
class file for org.eclipse.core.runtime.jobs.ISchedulingRule not found
IProject[] projects = root.getProjects();
^
SampleHandler.java:87: cannot find symbol
symbol : class Document
location: class handlers.SampleHandler
Document doc = new Document(unit.getSource());
^
SampleHandler.java:87: cannot find symbol
symbol : class Document
location: class handlers.SampleHandler
Document doc = new Document(unit.getSource());
^
4 errors
我有更多的错误,但在的帮助下,我可以添加org.eclipse.equinox.common_3.6.0.v20110523.jar
来删除许多错误
jar名称似乎不能反映包的导入名称。
我怎么知道应该添加哪些jar文件来删除错误呢?我觉得非常有用。使用这个站点,我可以提供类名来查找可用eclipse版本的jar名称
例如,我可以搜索org.eclipse.jface.text.Document
通过单击该类,我可以识别jar文件的名称
即使没有最新的eclipse信息,我也能猜出jar的名字。Nice,但现在(2015年11月)这个网站不起作用了。