In JDK8 the class sun.security.x509.CertAndKeyGen
does not exists anymore. Also sun.security.pkcs.PKCS10
is missing. In JDK7 they existed. What could be an alternatives to these classes methods?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
You should switch to the BouncyCastle API instead.
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.
If you are using maven, put this in pom.xml. (from this question):