0

我在 Java 10 上运行 Photon。我正在测试一个小插件,用于帮助我学习如何编写插件。当我运行插件时,我收到以下弹出验证消息:

Missing Constraint: Bundle-RequiredExecutionEnvironment: JavaSE-10

我的 MANIFEST.MF 文件如下:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Application
Bundle-SymbolicName: com.packtpub.e4.application;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.packtpub.e4.application.Activator
Bundle-Vendor: PACKTPUB
Require-Bundle: javax.inject;bundle-version="0.0.0",
 org.eclipse.swt;bundle-version="0.0.0",
 org.eclipse.e4.ui.model.workbench;bundle-version="0.0.0",
 org.eclipse.jface;bundle-version="0.0.0",
 org.eclipse.e4.ui.services;bundle-version="0.0.0",
 org.eclipse.e4.ui.workbench;bundle-version="0.0.0",
 org.eclipse.e4.core.di;bundle-version="0.0.0",
 org.eclipse.e4.ui.di;bundle-version="0.0.0",
 org.eclipse.e4.core.contexts;bundle-version="0.0.0",
 org.eclipse.core.runtime;bundle-version="0.0.0",
 org.eclipse.e4.core.di.extensions;bundle-version="0.15.100",
 org.eclipse.e4.core.services;bundle-version="2.1.100",
 org.eclipse.osgi.services;bundle-version="3.7.0"
Bundle-RequiredExecutionEnvironment: JavaSE-10
Automatic-Module-Name: com.packtpub.e4.application
Import-Package: javax.annotation;version="0.0.0"
Bundle-ActivationPolicy: lazy
Service-Component: OSGI-INF/*.xml

我的启动配置在这里:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
    <booleanAttribute key="append.args" value="true"/>
    <stringAttribute key="application" value="org.eclipse.e4.ui.workbench.swt.E4Application"/>
    <booleanAttribute key="askclear" value="true"/>
    <booleanAttribute key="automaticAdd" value="false"/>
    <booleanAttribute key="automaticValidate" value="true"/>
    <stringAttribute key="bootstrap" value=""/>
    <stringAttribute key="checked" value="[NONE]"/>
    <booleanAttribute key="clearConfig" value="false"/>
    <booleanAttribute key="clearws" value="true"/>
    <booleanAttribute key="clearwslog" value="false"/>
    <stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/com.packtpub.e4.application.product"/>
    <booleanAttribute key="default" value="false"/>
    <booleanAttribute key="includeOptional" value="true"/>
    <stringAttribute key="location" value="${workspace_loc}/runtime-com.packtpub.e4.application.product"/>
    <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" **value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-10"/>**
    <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -clearPersistedState"/>
    <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
    <stringAttribute key="pde.version" value="3.3"/>
    <stringAttribute key="product" value="com.packtpub.e4.application.product"/>
    <stringAttribute key="productFile" value="\com.packtpub.e4.application\com.packtpub.e4.application.product"/>
    <stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,org.apache.batik.constants@default:default,org.apache.batik.css@default:default,org.apache.batik.i18n@default:default,org.apache.batik.util@default:default,org.apache.commons.io@default:default,org.apache.commons.jxpath@default:default,org.apache.commons.logging@default:default,org.apache.felix.scr@1:true,org.apache.xmlgraphics@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime@default:true,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.annotations@default:default,org.eclipse.e4.core.di.extensions.supplier@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.emf.xpath@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.databinding@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
    <stringAttribute key="selected_workspace_plugins" value="com.packtpub.e4.application@default:default"/>
    <booleanAttribute key="show_selected_only" value="false"/>
    <booleanAttribute key="tracing" value="false"/>
    <booleanAttribute key="useCustomFeatures" value="false"/>
    <booleanAttribute key="useDefaultConfig" value="true"/>
    <booleanAttribute key="useDefaultConfigArea" value="true"/>
    <booleanAttribute key="useProduct" value="true"/>
    <booleanAttribute key="usefeatures" value="false"/>
</launchConfiguration>

如您所见,启动配置正在请求 JaveSE 10-我不知道为什么在插件加载和运行时出现此错误而没有其他问题。

4

1 回答 1

0

这似乎是一个 Eclipse 错误。JavaSE-10 在Bundle-RequiredExecutionEnvironment.

一种解决方法是在Bundle-RequiredExecutionEnvironment. 您可能会收到 JRE 容器不是完美匹配的警告,这可以忽略。

于 2018-07-17T15:38:11.600 回答