0

当我们在 Eclipse 中运行应用程序时,如何识别来自 Eclipse 的哪个 jar 正在调用。

当我们运行一个应用程序时,是否有任何进程或任何代码会为我们提供特定的 jar 名称

4

2 回答 2

0

我假设您需要与 Eclipse 本身的 About 对话框中的相同,但对于您的应用程序。在这种情况下,您可以简单地查询平台。喜欢:

IBundleGroupProvider[] bundleGroupProviders = Platform.getBundleGroupProviders(); 
for (IBundleGroupProvider bundleProvider : bundleGroupProviders) {
  for (IBundleGroup bundleGroup : bundleProvider.getBundleGroups()) {
    Bundle aSingleBundle = bundleGroup.getBundles();
    // TODO: do something useful with this precious information
  }
}

这应该会为您提供与您的应用程序一起加载的所有捆绑包

于 2013-08-20T10:35:01.943 回答
0

您可能对 Eclipse 插件系统有误解。如果您正在运行单个 Eclipse 应用程序,那么该应用程序由数百个插件组成,并且在正常情况下,大量插件会同时执行。一个仅用于管理您的工作区,一个用于特定用途,另一个用于另一个视图,依此类推。

于 2013-08-21T05:24:21.303 回答