eclipse tycho + java 11 = Unknown OSGi execution environment: 'JavaSE-11'

心不动则不痛 提交于 2019-12-22 06:45:07

问题


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

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

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

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


回答1:


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)



来源:https://stackoverflow.com/questions/52607910/eclipse-tycho-java-11-unknown-osgi-execution-environment-javase-11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!