1. <legend id='Tk1p2'><style id='Tk1p2'><dir id='Tk1p2'><q id='Tk1p2'></q></dir></style></legend>
    <tfoot id='Tk1p2'></tfoot>
    1. <i id='Tk1p2'><tr id='Tk1p2'><dt id='Tk1p2'><q id='Tk1p2'><span id='Tk1p2'><b id='Tk1p2'><form id='Tk1p2'><ins id='Tk1p2'></ins><ul id='Tk1p2'></ul><sub id='Tk1p2'></sub></form><legend id='Tk1p2'></legend><bdo id='Tk1p2'><pre id='Tk1p2'><center id='Tk1p2'></center></pre></bdo></b><th id='Tk1p2'></th></span></q></dt></tr></i><div id='Tk1p2'><tfoot id='Tk1p2'></tfoot><dl id='Tk1p2'><fieldset id='Tk1p2'></fieldset></dl></div>
        <bdo id='Tk1p2'></bdo><ul id='Tk1p2'></ul>

      <small id='Tk1p2'></small><noframes id='Tk1p2'>

    2. 如何在 Eclipse 插件中使用 Java11(Java10)?

      How to use Java11 (Java10) with Eclipse Plugin?(如何在 Eclipse 插件中使用 Java11(Java10)?)

      <small id='pEHLz'></small><noframes id='pEHLz'>

        <bdo id='pEHLz'></bdo><ul id='pEHLz'></ul>
          <tbody id='pEHLz'></tbody>

        1. <tfoot id='pEHLz'></tfoot>
            <legend id='pEHLz'><style id='pEHLz'><dir id='pEHLz'><q id='pEHLz'></q></dir></style></legend>

            • <i id='pEHLz'><tr id='pEHLz'><dt id='pEHLz'><q id='pEHLz'><span id='pEHLz'><b id='pEHLz'><form id='pEHLz'><ins id='pEHLz'></ins><ul id='pEHLz'></ul><sub id='pEHLz'></sub></form><legend id='pEHLz'></legend><bdo id='pEHLz'><pre id='pEHLz'><center id='pEHLz'></center></pre></bdo></b><th id='pEHLz'></th></span></q></dt></tr></i><div id='pEHLz'><tfoot id='pEHLz'></tfoot><dl id='pEHLz'><fieldset id='pEHLz'></fieldset></dl></div>

              1. 本文介绍了如何在 Eclipse 插件中使用 Java11(Java10)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                如果我在我的 Eclipse 插件中指定 JavaSE-10 作为最小执行环境:

                将插件作为 Eclipse 应用程序启动时出现以下错误:

                org.osgi.framework.BundleException:无法解析模块:org.treez.core [597]未解决的需求:Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=10))"未解决的需求:Require-Bundle: org.treez.javafxd3;可见性:=再出口"->捆绑符号名称:org.treez.javafxd3;捆绑版本="1.0.0.qualifier";单例:=真"org.treez.javafxd3 [586]未解决的需求:Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=10))"在 org.eclipse.osgi.container.Module.start(Module.java:444)在 org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634)在 org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1613)在 org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585)在 org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528)在 org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)在 org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)在 org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

                我查过了

                • Java10 在已安装的 JRE 下备受推崇
                • 10 被选为合规级别

                我使用 Oxygen.3a Release (4.7.3a) Build id: 20180405-1200

                =>这是 Eclipse Equinox 中的错误吗?

                =>我还可以检查什么来解决这个问题?

                如果我从最低执行环境设置中删除 JavaSE-10,我就能够启动 Eclipse 应用程序并且插件似乎工作正常.

                当我导出插件时,我收到以下警告:

                # 25.04.18, 12:25:40 MESZ# Eclipse Compiler for Java(TM) v20180330-0919, 3.13.102, 版权所有 IBM Corp 2000, 2015.保留所有权利.合规级别 9 及以上不支持选项 -bootclasspath

                当我从我的更新页面安装插件后尝试使用它时,我得到一个 ClassNotFoundException:

                <代码>...原因:java.lang.ClassNotFoundException: org.treez.views.views_1.0.0.201804191641 找不到 org.treez.views.tree.TreeViewPart在 org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484)在 org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)在 org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)在 org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)在 java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)在 org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564)在 org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)... 114 更多

                如果我使用 Java8,一切正常.

                相关问题:

                • (因此,如果未应用该选项,我假设在导出向导的编译步骤中出现问题.)

                  我使用 Java 11.0.1 和 Eclipse SimRel 2018-09(加上 Java11 支持插件)

                  If I specify JavaSE-10 as minimum execution environment in my Eclipse plugin:

                  I get following errors when starting my plugin as Eclipse Application:

                  org.osgi.framework.BundleException: Could not resolve module: org.treez.core [597]
                    Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=10))"
                    Unresolved requirement: Require-Bundle: org.treez.javafxd3; visibility:="reexport"
                      -> Bundle-SymbolicName: org.treez.javafxd3; bundle-version="1.0.0.qualifier"; singleton:="true"
                         org.treez.javafxd3 [586]
                           Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=10))"
                  
                      at org.eclipse.osgi.container.Module.start(Module.java:444)
                      at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634)
                      at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1613)
                      at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585)
                      at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528)
                      at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
                      at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
                      at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
                  

                  I checked that

                  • Java10 is reverenced under Installed JREs
                  • 10 is selected as compliance level

                  I use Oxygen.3a Release (4.7.3a) Build id: 20180405-1200

                  =>Is this a bug in eclipse equinox?

                  =>What else can I check to resolve this issue?

                  If I remove JavaSE-10 from the minimum execution environment settings I am able to start the Eclipse Application and the plugin seems to work fine.

                  When I export the plugin I get following warning:

                  # 25.04.18, 12:25:40 MESZ
                  # Eclipse Compiler for Java(TM) v20180330-0919, 3.13.102, Copyright IBM Corp 2000, 2015. All rights reserved.
                  option -bootclasspath not supported at compliance level 9 and above
                  

                  When I try to use the plugin after installing it from my update page, I get a ClassNotFoundException:

                  ...
                  Caused by: java.lang.ClassNotFoundException: org.treez.views.tree.TreeViewPart cannot be found by org.treez.views_1.0.0.201804191641
                      at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484)
                      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
                      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
                      at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
                      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
                      at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564)
                      at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
                      ... 114 more
                  

                  If I use Java8 everything works fine.

                  Related questions:

                  • Java 8 & Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))"

                  • How to set up java 10 in Eclipse Oxygen?

                  • How to add org.eclipse.swt (and other plugin dependencies) as an automatic Java9 module?

                  解决方案

                  What worked for me as a work around was to

                  • Remove the required version entries from the manifest files and ignore the corresponding warnings

                  • Activate the option "Use class files compiled in the workspace" in the export wizard:

                  (Therefore I assume that something goes wrong during the compilation step of the export wizard if that option is not applied.)

                  I used Java 11.0.1 and Eclipse SimRel 2018-09 (plus Java11 support plugin)

                  这篇关于如何在 Eclipse 插件中使用 Java11(Java10)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Cannot load 64-bit SWT libraries on 32-bit JVM ( replacing SWT file )(无法在 32 位 JVM 上加载 64 位 SWT 库(替换 SWT 文件))
                How can I specify the default JVM arguments for programs I run from eclipse?(如何为从 Eclipse 运行的程序指定默认 JVM 参数?)
                Class JavaLaunchHelper is implemented in both ... libinstrument.dylib. One of the two will be used. Which one is undefined(JavaLaunchHelper 类在... libinstrument.dylib 中都实现了.将使用两者之一.哪个是未定义的) - IT屋-程序员软件开发技术分享
                Running Eclipse on Windows 7 JRE and JDK not found(找不到在 Windows 7 JRE 和 JDK 上运行 Eclipse)
                StringBuilder vs. .concat vs. quot;+quot; Operator relative performance different in eclipse than command line?(StringBuilder vs. .concat vs. “+eclipse中的操作员相对性能与命令行不同?)
                Is there a maximum number you can set Xmx to when trying to increase jvm memory?(尝试增加 jvm 内存时,您可以将 Xmx 设置为最大数量吗?)
                  <tbody id='jkbol'></tbody>

              2. <i id='jkbol'><tr id='jkbol'><dt id='jkbol'><q id='jkbol'><span id='jkbol'><b id='jkbol'><form id='jkbol'><ins id='jkbol'></ins><ul id='jkbol'></ul><sub id='jkbol'></sub></form><legend id='jkbol'></legend><bdo id='jkbol'><pre id='jkbol'><center id='jkbol'></center></pre></bdo></b><th id='jkbol'></th></span></q></dt></tr></i><div id='jkbol'><tfoot id='jkbol'></tfoot><dl id='jkbol'><fieldset id='jkbol'></fieldset></dl></div>
                <legend id='jkbol'><style id='jkbol'><dir id='jkbol'><q id='jkbol'></q></dir></style></legend>

                <small id='jkbol'></small><noframes id='jkbol'>

                    • <bdo id='jkbol'></bdo><ul id='jkbol'></ul>

                          <tfoot id='jkbol'></tfoot>