简体   繁体   English

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

[英]Installing Checkstyle-Plugin (7.2.0) for Eclipse Neon fails

I tried to install the checkstyle-Plugin for my eclipse bundle Eclipse for Java Developers , by dragging the provided link from http://eclipse-cs.sourceforge.net/#!/ onto my Eclipse window. 我尝试通过将提供的链接从http://eclipse-cs.sourceforge.net/#!/拖到我的Eclipse窗口中,来为我的Eclipse for Java Developers捆绑包Eclipse for Java Developers安装checkstyle-Plugin。

Unfortunately this results in the following error: 不幸的是,这导致以下错误:

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

Any idea how I might fix this? 知道我该如何解决吗?

Installing it using the Marketplace also did not work. 使用Marketplace安装它也不起作用。 It failed with: 它失败了:

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

YOU NEED TO INSTALL YOUR NETWORK ROOT SSL CERTIFICATE INTO JRE CACERTS. 您需要将网络根SSL证书安装到JRE CACERTS中。 FOR ANY JAVA PKIX SSL EXAPTION YOU MAY FOLLOW THIS GUIDE. 对于任何JAVA PKIX SSL认证,您都可以遵循本指南。

How to get Root Certificate? 如何获得根证书?

  1. Open Google Chrome and navigate to https://sourceforge.net/ 打开谷歌浏览器并导航到https://sourceforge.net/
  2. Click on icon just besides your url. 单击网址旁边的图标。 see following image. 见下图。

在此处输入图片说明

  1. Click on View Certificate.You can see hierarchy and select top most certificate in hierarchy 单击查看证书。您可以查看层次结构并选择层次结构中最上面的证书
  2. Confirm that certificate have ROOT word in its name. 确认证书名称中包含ROOT词。
  3. Now just bellow that hierarchy part you can see a rectangle image of the certificate. 现在,在该层次结构部分下面,您可以看到证书的矩形图像。 Just drag that image and drop it to your desktop. 只需将该图像拖放到桌面上即可。

NOW YOU HAVE YOUR ROOT CERTIFICATE! 现在您已经有了根证书!

HOW TO INSTALL THIS CERTIFICATE INTO JRE CACERTS? 如何将此证书安装到JRE CACERTS中?

Before you proceed further do confirm you had located exactly that jre which is giving this error. 在继续进行之前,请确认您已完全找到给出此错误的jre。 Many times IDE uses jre which is bundled with it not system jre. 很多时候,IDE使用与它捆绑在一起的jre而不是系统jre。 In my case I pointed all my IDE to my system Java installation. 就我而言,我将所有IDE都指向了系统Java安装。

  1. use keytool.exe inside your jre bin folder. 在jre bin文件夹中使用keytool.exe。
  2. fire following command to place your certificate inside cacerts file 触发以下命令将您的证书放入cacerts文件中

keytool -import -noprompt -trustcacerts -alias ALIASNAME -file keytool-导入-noprompt -trustcacerts-别名别名-文件
/PATH/TO/YOUR/DESKTOP/CertificateName.cer -keystore /PATH/TO/YOUR/JDK/jre/lib/security/cacerts -storepass changeit / PATH / TO /您的/DESKTOP/CertificateName.cer-密钥库/ PATH / TO /您的/ JDK / jre / lib / security / cacerts -storepass changeit

NOW YOUR PROBLEM IS RESOLVED! 现在,您的问题已解决! RESTART YOUR IDE AND CHECK RESULTS. 重新启动您的IDE并检查结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM