sun.security.x509.CertAndKeyGen and sun.security.pkcs.PKCS10 - missing in JDK8. Implementation suggestions

不羁岁月 提交于 2019-12-04 05:09:33

I think you are looking for: sun.security.tools.keytool.CertAndKeyGen

You'll find it inside the rt.jar under the JRE libraries.

Keep in mind this class is outside of J2SE, it's likely only available with OpenJDK, so for example the GNU Compiler won't have it.

mesompi

If you are using maven, put this in pom.xml. (from this question):

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.2</version>
  <configuration>
     <fork>true</fork>
     <compilerArgument>-XDignore.symbol.file</compilerArgument>
  </configuration>
</plugin>

You should switch to the BouncyCastle API instead.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!