eclipse tycho + java 11 =未知的OSGi执行环境:“ JavaSE-11”

时间:2018-10-02 12:00:57

标签: java eclipse-rcp tycho java-11

如何使用tycho构建基于Java 11的eclipse RCP应用?
我正在使用Eclipse 2018-09 RCP + Java 11插件+ OpenJDK 11
我的应用程序是基于插件的,在所有插件中,MANIFEST.MF文件包含:

Bundle-RequiredExecutionEnvironment: JavaSE-11

tycho构建因以下异常而失败:

    [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应用程序?

I found this post非常相似(对于Java 10 ...)

1 个答案:

答案 0 :(得分:1)

使用eclipse RCP v2018-12(v4.10)+ eclipse tycho v1.3.0解决了我所有的问题
JMSToolBox现在是使用Java 11开发和分发的。
(另请参见this帖子,以打包Java 11 JRE)