org.osgi.framework.BundleException:找不到bundle:org.eclipse.equinox.console

命令:

\eclipse-SDK-4.2RC3-win32-x86_64_001\eclipse\plugins>java -jar org.eclipse.osgi_3.8.0.v20120529-1548.jar -console 

exception(来自日志文件)

 !SESSION 2012-06-22 23:36:27.649 ----------------------------------------------- eclipse.buildId=unknown java.version=1.6.0_25 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US Command-line arguments: -console !ENTRY org.eclipse.osgi 4 0 2012-06-22 23:36:28.632 !MESSAGE Could not find bundle: org.eclipse.equinox.console !STACK 0 org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console at org.eclipse.osgi.framework.internal.core.ConsoleManager.checkForConsoleBundle(ConsoleManager.java:211) at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:297) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:151) !ENTRY org.eclipse.osgi 4 0 2012-06-22 23:36:28.663 !MESSAGE Application error !STACK 1 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini). at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:151) 

但是以下的jar子是可用的。

 org.eclipse.equinox.console_1.0.0.v20120522-1841.jar 

有关上述错误的任何建议?

您需要安装几个软件包才能使用控制台,如果只使用java -jar ...启动Equinox java -jar ...那么您将无法获得这些软件包。

实现此function的最快方法是使用以下内容创建名为configuration/config.ini的文件:

 osgi.bundles=file\:org.eclipse.equinox.console_1.0.0.v20111215-1210.jar@start,file:\org.apache.felix.gogo.runtime_0.8.0.v201108120515.jar@start,file:\org.apache.felix.gogo.shell_0.8.0.v201110170705.jar@start 

注意,您必须根据实际情况查看这些捆绑包的版本号。 我尝试使用SDK-4.2M6,其中一些可能在RC3中发生了变化。

在新版本的equinox中,内置的OSGi shell已被替换为felix gogo shell。 如果你想使用新的shell,你必须放置gogo jar,并在配置文件中定义它们。

但是,如果你喜欢OSGi Equinox shell,你只需要在config.ini文件中添加以下行来使用它: osgi.console.enable.builtin=true 。 在这种情况下,无需添加额外的jar子或任何配置。

这是因为Eclipse的默认shell已被移动到“Apache Felix Gogo”; 因此必须在运行之前将必要的包添加到“运行配置”中。 以下是您需要从列表中选择的四个捆绑:

 org.apache.felix.gogo.command_0.10.0v.jar org.apache.felix.gogo.runtime_0.10.0v.jar org.apache.felix.gogo.shell_0.10.0v.jar org.eclipse.equinox.console_1.0.100.jar 

在此处输入图像描述

如上图所示添加这些后,程序运行顺畅。

参考: http : //www.digizol.com/2013/11/Eclipse-org-osgi-framework-BundleException-equinox-console.html

我有同样的问题,我试图在config.ini文件中添加osgi.console.enable.builtin=true ,但似乎每次运行项目时都会重新创建文件,我解决问题的方式运行配置 – >参数选项卡在VM参数中添加-Dosgi.console.enable.builtin=true 在此处输入图像描述

我在Ubuntu Linux上使用Eclipse Helios和Eclipse Juno。 我在Eclipse Juno上遇到了同样的错误,我无法启动Eclipse。 我不知道如何,但我的Java版本减少到1.5,这导致了问题

在Eclipse Helios中,Java 1.5引起了问题,但我能够启动Eclipse。 Eclipse Helios出现的错误是:

 An internal error occurred during: "Loading Web Service DOM...". 

org.eclipse.emf.ecore.util.EcoreEMap$DelegateEObjectContainmentEList

将Java版本更新为1.7解决了这个问题 。 我猜Eclipse Juno不适用于Java 1.5 🙂

尝试使用新工作区。 要强制工作区窗口提示,您需要更改Eclipse_root_dir\configuration\.settings\org.eclipse.ui.ide.prefs设置并将SHOW_WORKSPACE_SELECTION_DIALOG设置为true

其中一个变种是选择另一个java版本 (早于默认值),eclipse旧版本在尝试运行java 9错误时出错

 sudo update-alternatives --config java 

我选择了java 8并且所有工作