java - 为 Eclipse Neon 安装 Checkstyle-Plugin (7.2.0) 失败

标签 java eclipse plugins

我尝试通过拖动 http://eclipse-cs.sourceforge.net/#!/ 中提供的链接来为我的 eclipse 包 Eclipse for Java Developers 安装 checkstyle-Plugin到我的 Eclipse 窗口。

不幸的是,这会导致以下错误:

An error occurred while collecting items to be installed
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,net.sf.eclipsecs.branding,7.2.0.201611072237
No repository found containing: osgi.bundle,net.sf.eclipsecs.checkstyle,7.2.0.201611072237
No repository found containing: osgi.bundle,net.sf.eclipsecs.core,7.2.0.201611082201
No repository found containing: osgi.bundle,net.sf.eclipsecs.doc,7.2.0.201611082205
No repository found containing: org.eclipse.update.feature,net.sf.eclipsecs,7.2.0.201611082205
No repository found containing: osgi.bundle,net.sf.eclipsecs.ui,7.2.0.201611072237

知道如何解决这个问题吗?

使用市场安装它也不起作用。它失败了:

An error occurred while collecting items to be installed
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Unable to read repository at https://sourceforge.net/projects/eclipse-cs/files/updatesite/7.2.0/plugins/net.sf.eclipsecs.doc_7.2.0.201611082205.jar.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Unable to read repository at https://sourceforge.net/projects/eclipse-cs/files/updatesite/7.2.0/features/net.sf.eclipsecs_7.2.0.201611082205.jar.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

最佳答案

您需要将网络根 SSL 证书安装到 JRE CACERT 中。对于任何 JAVA PKIX SSL 扩展,您可以遵循本指南。

如何获取根证书?

  1. 打开 Google Chrome 浏览器并导航至 https://sourceforge.net/
  2. 点击您的网址旁边的图标。参见下图。

enter image description here

  • 点击“查看证书”。您可以查看层次结构并选择层次结构中最顶层的证书
  • 确认证书名称中包含 ROOT 单词。
  • 现在,在该层次结构部分下方,您可以看到证书的矩形图像。只需将该图像拖放到桌面即可。
  • 现在您已拥有根证书!

    如何将此证书安装到 JRE CCERTS 中?

    在继续操作之前,请确认您已准确找到导致此错误的 jre。很多时候IDE使用与其捆绑的jre而不是系统jre。就我而言,我将所有 IDE 指向我的系统 Java 安装。

    1. 在 jre bin 文件夹中使用 keytool.exe。
    2. 触发以下命令将您的证书放入 cacerts 文件

    keytool -import -noprompt -trustcacerts -alias ALIASNAME -file
    /PATH/TO/YOUR/DESKTOP/CertificateName.cer -keystore /PATH/TO/YOUR/JDK/jre/lib/security/cacerts -storepass changeit

    现在您的问题已解决!重新启动您的 IDE 并检查结果。

    关于java - 为 Eclipse Neon 安装 Checkstyle-Plugin (7.2.0) 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40681548/

    相关文章:

    eclipse - FindBugs 未显示在项目属性中

    android - Android 平台上的浏览器插件查询(Froyo 2.2.1 版本)

    java - 实测插入排序速度太快

    java - 如何将程序的输出写入Excel表格

    java - Eclipse 项目无法识别 Swagger Codegen Artifact

    PHP/jQuery - 将值从 jQuery Stepper 传递到 php 页面

    java - 如何在 java 中读取不以换行符或回车符结尾的行?

    Java - 复制构造函数 - java.lang.NullPointerException

    java - Android/SQLite/多表

    android - ADT Bundle for mac 已损坏