问题
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.MF
file 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