本文介绍了eclipse tycho + java 11 =未知的OSGi执行环境:“ JavaSE-11”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用tycho构建基于Java 11的eclipse RCP应用程序?

我正在使用eclipse 2018-09 RCP + Java 11插件+ OpenJDK 11

我的应用程序是基于插件的,在所有插件中, MANIFEST.MF 文件包含:

How to build an eclipse RCP app based on Java 11 with tycho?
I'm using eclipse 2018-09 RCP + the Java 11 plugin + OpenJDK 11
My application is plugin-based and in all the plugins, theMANIFEST.MFfile contains:

Bundle-RequiredExecutionEnvironment: JavaSE-11

tycho构建失败,但以下异常:

The tycho build fails with the following exception:

    [ERROR] Internal error: org.eclipse.tycho.core.osgitools.OsgiManifestParserException: Exception parsing OSGi MANIFEST {...}\META-INF\MANIFEST.MF: Unknown OSGi execution environment: 'JavaSE-11' -> [Help 1]
    org.apache.maven.InternalErrorException: Internal error: org.eclipse.tycho.core.osgitools.OsgiManifestParserException: Exception parsing OSGi MANIFEST {...}\META-INF\MANIFEST.MF: Unknown OSGi execution environment: 'JavaSE-11'
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:120)
    {...}
    Caused by: org.eclipse.tycho.core.ee.UnknownEnvironmentException: Unknown OSGi execution environment: 'JavaSE-11'
        at org.eclipse.tycho.core.ee.ExecutionEnvironmentUtils.getExecutionEnvironment(ExecutionEnvironmentUtils.java:84)
        at org.eclipse.tycho.core.osgitools.OsgiManifest.parseExecutionEnvironments(OsgiManifest.java:66)
        ... 24 more

tycho是否与Java 11兼容?如果是的话,如何配置它来构建Java 11 RCP应用程序?

Is tycho compatible with Java 11? if so how to configure it to build java 11 RCP apps?

,非常相似(对于Java 10 ...)

I found this post that is very similar (for Java 10...)

推荐答案

使用eclipse RCP v2018-12(v4.10)+ eclipse tycho v1.3.0解决了我所有的问题

现在使用Java 11

开发和分发(另请参见帖子,用于打包Java 11 JRE)

Using eclipse RCP v2018-12 (v4.10) + eclipse tycho v1.3.0 solved all my problems
JMSToolBox is now developped and distributed with Java 11
(see also this post for packaging Java 11 JRE)

这篇关于eclipse tycho + java 11 =未知的OSGi执行环境:“ JavaSE-11”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 14:00