keytool错误:java.lang.Exception:必须指定-keyalg [英] keytool error: java.lang.Exception: The -keyalg must be specified

查看:62
本文介绍了keytool错误:java.lang.Exception:必须指定-keyalg的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建密钥对,并从Windows命令行提示符(使用Windows 10 JDK 14)将它们存储在密钥存储区中.这是我输入的命令:

I am trying to create a key pair and storing them in a key store from the Windows command line prompt (using Windows 10 JDK 14). Here is the command I am typing:

keytool -genkey -alias chris -keystore chirskeystore

首先,系统提示我输入密码,然后重新输入密码,最后,它返回以下错误:

First, system prompts me for a password then re-enter the password and finally, it returns with the following error:

keytool error: java.lang.Exception: The -keyalg option must be specified.

该命令直接来自有关Java安全性的Oracle教程: https://docs.oracle.com/javase/tutorial/security/toolfilex/step2.html
搜索 -keyalg 或错误导致错误.任何见识都会很棒.

The command is directly from the Oracle tutorial on java security: https://docs.oracle.com/javase/tutorial/security/toolfilex/step2.html
Searching for the -keyalg or the error led to nowhere. Any insight will be great.

谢谢.

推荐答案

事实证明,与JDK \ bin 5/4/2020中的密钥工具相比,JRE \ bin中的keytool是最新的6/6/2020.JRE \ bin中的keytool可以正常工作.

Well it turned out that keytool in the JRE\bin is more recent 6/6/2020 than the one in the JDK\bin 5/4/2020. The keytool in the JRE\bin works fine.

这篇关于keytool错误:java.lang.Exception:必须指定-keyalg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆