java 8 keytool 使用的默认密钥库文件名和位置是什么?

what is the default keystore file name and location that java 8 keytool use?

给出命令 c:\java\jre8\bin\keytool -genkey -alias tomcat -storetype PKCS12 -keyalg RSA -keysize 2048

如你所见我忘了告诉文件名和位置 一切顺利,密钥库似乎已创建 但 密钥库文件是在哪里创建的?!

默认文件名将是 .keystore

和位置 c:\Users\\.keystore

感谢 this answer 给了我提示

现在我知道它有点道理了。

另外from the docs:

-keystore keystore
The keystore location.
...
For example, if keytool -genkeypair is invoked and the -keystore option is not specified,
the default keystore file named .keystore in the user's home directory will be created if it does not already exist.
Similarly, if the -keystore ks_file option is specified but ks_file does not exist, then it will be created