This article mainly explains how to open and use the Java-keytool tool. For details on the use of the Java--keytool certificate tool, please refer to the article: java keytool certificate tool usage summary .
Open the CMD window and enter the keytool command, you can find that the Win system does not recognize this command. As shown in Figure 1 below
Figure 1
In fact, the keytool tool has been decompressed into the corresponding jdk-bin directory during the JDK installation process. Taking the JDK1.8 tool I installed as an example, the directory where the keytool.exe tool is located is: D:\Program Files\Java\jdk1.8.0_40\bin . As shown in Figure 2 below
Figure II
Since I did not configure the specific environment variable path of keytool.exe in the computer, I need to jump the path to the D:\Program Files\Java\jdk1.8.0_40\bin directory in the CMD window, and then the keytool command can be used. . As shown in Figure 3 below
If a small partner does not want to use the keytool command every time in the CMD window to jump the path to the jdk-bin directory, you need to configure the corresponding environment variables. I personally speculate that the path to keytool.exe needs to be added to the environment variable Path.
Figure 3
Sincerely, this blog is over.
The purpose of writing this blog is that I need to use the keytool tool when I watch the learning video of Mr. Zhou Li teaching Spring Cloud, "Configuration Attribute Encryption--Symmetric Encryption, Configuration Attribute Encryption--Asymmetric Encryption" 2 subsections to complete the encryption and decryption operations.