Java Keytool error after importing certificate , “keytool error: java.io.FileNotFoundException & Access Denied”

后端 未结 11 1012
再見小時候
再見小時候 2020-12-02 06:37

I\'m trying to connect a Java Web API via HTTPS; however, an exception is thrown:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorExcept         


        
相关标签:
11条回答
  • 2020-12-02 07:31

    This could happen if you are not running the command prompt in administrator mode. If you are using windows 7, you can go to run, type cmd and hit Ctrl+Shift+enter. This will open the command prompt in administrator mode. If not, you can also go to start -> all programs -> accessories -> right click command prompt and click 'run as administrator'.

    0 讨论(0)
  • 2020-12-02 07:31

    If you are using windows8:

    1. Click start button
    2. In the search box, type command prompt
    3. From the result, right-click command prompt and click Run as administrator. Then execute the keytool command.
    0 讨论(0)
  • 2020-12-02 07:32

    Check the write permissions on the keystore.

    0 讨论(0)
  • 2020-12-02 07:36

    I got this error too even I ran cmd as an Administrator.

    The root cause is: The file is from VCS(subversion, perforce, etc.), and when I checked the properties of this file, its' Attributes is Read-only.

    So the solution is:

    • (1) disable the 'Read-only' Attribute;
    • (2) check out from VCS, let the file under the status of read&write.
    0 讨论(0)
  • 2020-12-02 07:38

    I had the same problem under Windows and could solve it by running cmd.exe as administrator (right-click in start menu, then "Run as administrator).

    0 讨论(0)
提交回复
热议问题