“无法获取应用程序服务”;启动使用Tycho构建的Eclipse应用程序时出现错误 [英] "Unable to acquire application service" error when starting an Eclipse application built with Tycho

查看:108
本文介绍了“无法获取应用程序服务”;启动使用Tycho构建的Eclipse应用程序时出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是Tycho社区中经常问到的一个问题:

This is a question which is frequently asked in the Tycho community:


我想用Tycho构建Eclipse分发/ RCP应用程序

I want to build an Eclipse distribution/RCP application with Tycho.

为此,我创建了一个 eclipse-repository 项目,该项目的产品文件指定了要被包括在内。然后,我配置了tycho-p2-director-plugin 以创建安装产品。

To do this, I have created an eclipse-repository project with a product file which specifies the features to be included. Then, I have configured the tycho-p2-director-plugin to create an installation of the product.

该版本运行良好,但安装无法启动。日志包含以下错误:

The build runs fine, but the installation fails to start up. The log contains the following error:

java.lang.IllegalStateException:无法获取应用程序服务。确保已解决并启动org.eclipse.core.runtime捆绑包(请参阅config.ini)。

我隐约记得我需要告诉Eclipse如何进行引导,但是我不知道我到底需要什么配置。是否有适用于大多数Eclipse安装的配置?还是可以以某种方式从运行的Eclipse安装中复制配置?

I vaguely remember that I need to tell Eclipse how to bootstrap, but I don't know what configuration I need exactly. Is there a configuration that will work with most Eclipse installations? Or can I somehow copy the configuration from a working Eclipse installation?


推荐答案

这是产品 E4入门指南中的a>:

Here’s the product from my E4 beginner’s guide book:

<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4"/>
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2"/>
<plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2"/>
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1"/>

在大多数情况下,您需要运行这些产品。

Those are the ones that you will need to get running for the product in most cases.

simpleconfigurator是负责读取bundles.info并显示所有内容的包-本质上是预先填充包并恢复启动/运行状态。

The simpleconfigurator is the bundle responsible for reading the bundles.info and bringing everything up - essentially pre-filling the bundles and restoring the started/running state.

ds捆绑包启动声明式服务(更多捆绑包正在使用)。

The ds bundle starts declarative services (which more bundles are using).

equinox.common提供IAdapterManager服务并注册平台: URL处理程序(因此捆绑包可以引用 platform:/org.eclipse.equinox.common/about.html 之类的内容)。

The equinox.common provides the IAdapterManager service and registers the platform: URL handler (so bundles can refer to content like platform:/org.eclipse.equinox.common/about.html).

core.runtime提供了首选项服务和首选项存储。

The core.runtime provides the preference service and the preference store.

希望有帮助!

这篇关于“无法获取应用程序服务”;启动使用Tycho构建的Eclipse应用程序时出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆