【问题标题】:Why do I see same class twice in eclipse为什么我在 Eclipse 中看到两次相同的课程
【发布时间】:2022-01-08 09:15:26
【问题描述】:

我在 jar 内的 Eclipse 中看到两个相同类的条目:jersey-container-jetty-http.jar。

我想这与这些类是存根的事实有关。它是如何工作的?以下类有重复条目

  1. JettyHttpContainer.class
  2. JettyHttpContainerFactory.class

【问题讨论】:

    标签: java eclipse jar jersey embedded-jetty


    【解决方案1】:

    您在 Eclipse IDE 中发现了一个视觉错误。

    jar 本身不包含重复的类。

    https://search.maven.org/artifact/org.glassfish.jersey.containers/jersey-container-jetty-http/3.0.2/jar

    您应该在https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT 提交错误

    【讨论】:

    • 我怀疑还有更多。有问题的类有两个实现,一个用于 Java8,另一个用于 java >11,在构建期间,适当的类被打包到 jar 中。
    • 不。您可以下载 jar 并使用 jar -tvf <file.jar> 工具亲自查看。该 jar 中不存在 JEP-238 MutliRelease JAR 行为。
    猜你喜欢
    • 2017-10-05
    • 2021-03-25
    • 2019-12-12
    • 1970-01-01
    • 2018-01-07
    • 1970-01-01
    • 1970-01-01
    • 2023-04-09
    • 2016-03-02
    相关资源
    最近更新 更多