我正在尝试使用 Eclipse org.eclipse.debug.core
包中的 ILaunchManager#getLaunchConfigurations
方法,但编译器给我消息:
类型 ILaunchManager 中的方法 getLaunchConfigurations() 引用了缺失的类型 CoreException
我可以看到 getLaunchConfigurations()
抛出了 CoreException
异常,但我就是找不到包含 CoreException
类的 jar!有谁知道我需要使用哪个 jar 来解决这个问题?
我使用的代码是:
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
for (ILaunchConfiguration launchConfiguration : launchManager.getLaunchConfigurations()) {
String configName = launchConfiguration.getName();
}
我在构建路径中包含了以下 jar:
org.eclipse.debug.core_3.7.100.v20120521-2012
org.eclipse.core.runtime_3.8.0.v20120521-2346
最佳答案
当您遇到此类问题时,一些有用的站点是:http://findjar.com和 http://grepcode.com
以下页面有搜索结果:http://grepcode.com/search?query=org.eclipse.core.runtime.CoreException&n=
您需要 org.eclipse.equinox.common.VERSION.jar
。
关于java - Eclipse CoreException 位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14837836/