Java keytool - 非法选项 deststorepass :file

标签 java linux shell keytool

感谢您的宝贵时间。我正在尝试从 PKCS12 文件创建 java keystore 。

这以前有效,但我已经做了一些工作,使用命令 keytool -importkeystore -deststorepass:file ...

从命令行中删除密码可见性

此功能显然在 Java > 7 中可用: http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/keytool.html

-storepass[:env|:file] argument Note: All other options that require passwords, such as -keypass, -srckeypass, -destkeypass -srcstorepass, and -deststorepass, accept the env and file modifiers. (Remember to separate the password option and the modifier with a colon, (:).)

但由于某种原因,我收到消息:非法选项:-deststorepass:file

有谁知道我在这里做错了什么,或者如何正确使用带有 :file 修饰符的 keytool 命令?

最佳答案

我已将 java 版本设置为 1.7,但忽略了将 keytool 设置为适当的版本。

update-alternatives --set keytool [path]

关于Java keytool - 非法选项 deststorepass :file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25932980/

相关文章:

java - 我可以从 <filter-mapping> 中的 <url-pattern> 中排除一些具体的 url 吗?

java - 在 Java 中获取 Windows 10 显示设置值

linux - 是否可以生成基于 Linux 的硬件特定密码和/或文件加密/解密?

linux - 在 bash 中运行时,如何在特定点向脚本发送击键?

使用 tar 查找差异的 c 代码

java - 从内部类访问扩展类的方法

Java:线程中的 `while (true) { ... }` 循环不好吗?有什么选择?

json - 如何解析变量中的Json

ruby - 如果\n 放在新行上,则忽略 SGR 重置代码

shell - 为什么 Tmux 有服务器?有什么好处?