You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Tycho构建的Eclipse RCP产品启动失败问题求助

Eclipse RCP项目(Maven-Tycho构建)Windows启动失败排查

问题描述

我有一个使用Maven-Tycho构建的Eclipse RCP项目。此前通过Maven构建后,该项目可在任何安装了JavaSE运行环境的主机上正常启动。但在某次更新(不清楚具体是哪些更新)后,生成的归档包在所有Windows主机上均无法启动,报错日志如下:

!ENTRY org.eclipse.equinox.simpleconfigurator 4 0 2022-12-03 14:41:27.751
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.equinox.simpleconfigurator [1]
  Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"

    at org.eclipse.osgi.container.Module.start(Module.java:463)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1852)
    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1845)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1788)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1750)
    at org.eclipse.osgi.container.SystemModule.startWorker(SystemModule.java:269)
    at org.eclipse.osgi.container.Module.doStart(Module.java:605)
    at org.eclipse.osgi.container.Module.start(Module.java:468)
    at org.eclipse.osgi.container.SystemModule.start(SystemModule.java:193)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:464)
    at org.eclipse.osgi.launch.Equinox.start(Equinox.java:139)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:338)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:251)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1467)

!ENTRY org.eclipse.osgi 4 0 2022-12-03 14:41:27.752
!MESSAGE Bundle initial@reference:file:plugins/org.eclipse.equinox.simpleconfigurator_1.4.100.v20220620-1617.jar was not resolved.

!ENTRY org.eclipse.equinox.simpleconfigurator 2 0 2022-12-03 14:41:27.756
!MESSAGE Could not resolve module: org.eclipse.equinox.simpleconfigurator [1]
  Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"


!ENTRY org.eclipse.osgi 4 0 2022-12-03 14:41:27.757
!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:81)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1467)

我的机器上已安装JavaSE 11、14和15三个版本的运行环境,且该项目可在Eclipse中正常启动。我已尝试重装不同版本的Java运行环境,但问题仍未解决,恳请提供排查线索。

排查线索

  • 检查启动脚本的Java版本指定:打开项目生成的Windows启动脚本(.bat文件),确认是否通过JAVA_HOME或-vm参数指定了Java 11的路径,避免系统默认使用低版本或不兼容的JDK。
  • 验证Maven构建的Java环境:执行mvn -v查看Maven当前使用的JDK版本,确保构建过程基于Java 11(Eclipse中的运行环境和Maven构建环境可能不一致)。
  • 检查Tycho配置的Java兼容性:查看项目pom.xml或Tycho目标平台配置,确认osgi.ee相关配置是否明确要求Java 11,比如<require-osgi-ee>节点的设置是否正确。
  • 核对目标平台的组件版本:报错中涉及的org.eclipse.equinox.simpleconfigurator版本为1.4.100.v20220620-1617,对比之前正常构建的版本,确认是否因组件更新导致Java版本要求提升,必要时回退到兼容版本。
  • 检查config.ini配置:查看归档包中configuration/config.ini文件,确认是否存在org.eclipse.osgi.requiredJavaVersion=11配置项,若缺失则添加,若存在则验证值是否正确。
  • 确认Windows系统的默认Java版本:打开命令行执行java -version,确认当前系统默认的Java版本是否为11,若不是则调整系统PATH优先级,或在启动脚本中强制指定Java 11路径。
  • 对比构建产物的依赖差异:将当前报错的归档包与之前正常工作的版本对比,检查plugins目录下的依赖组件(尤其是Equinox相关)是否有版本变更或缺失,确保所有依赖与Java 11兼容。

内容的提问来源于stack exchange,提问作者Кобрин Олег

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.09 17:01:09