Keytool is not recognized as an internal or external command

后端 未结 7 1062
独厮守ぢ
独厮守ぢ 2021-02-11 14:20

I am trying to discover the list of trusted authorities in my Java Runtime using the instructions in this article. When I typed the command below:

C:\\ColdFusion         


        
相关标签:
7条回答
  • 2021-02-11 14:41

    Run the cmd as run as administrator this worked for me

    0 讨论(0)
  • 2021-02-11 14:42

    Execute following command:

    set PATH="C:\Program Files (x86)\Java\jre7"

    (whichever JRE exists in case of 64bit).

    Because your Java Path is not set so you can just do this at command line and then execute the keytool import command.

    0 讨论(0)
  • 2021-02-11 14:49

    I finally solved the problem!!! You should first set the jre path to system variables by navigating to::

    control panel > System and Security > System > Advanced system settings 
    

    Under System variables click on new

    Variable name: KEY_PATH
    Variable value: C:\Program Files (x86)\Java\jre1.8.0_171\bin
    

    Where Variable value should be the path to your JDK's bin folder.

    Then open command prompt and Change directory to the same JDK's bin folder like this

    C:\Program Files (x86)\Java\jre1.8.0_171\bin 
    

    then paste,

    keytool -list -v -keystore "C:\Users\user\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android   
    

    NOTE: People are confusing jre and jdk. All I did applied strictly to jre

    0 讨论(0)
  • 2021-02-11 14:50

    Make sure JAVA_HOME is set and the path in environment variables. The PATH should be able to find the keytools.exe

    Open “Windows search” and search for "Environment Variables"

    Under “System variables” click the “New…” button and enter JAVA_HOME as “Variable name” and the path to your Java JDK directory under “Variable value” it should be similar to this C:\Program Files\Java\jre1.8.0_231

    0 讨论(0)
  • 2021-02-11 14:51

    A simple solution of error is that you first need to change the folder directory in command prompt. By default in command prompt or in terminal(Inside Android studio in the bottom)tab the path is set to C:\Users#Name of your PC that you selected\AndroidStudioProjects#app name\flutter_app> Change accordingly:- C:\Users#Name of your PC that you selected\AndroidStudioProjects#app name\flutter_app>cd\

    type **cd** (#after flutter_app>), type only cd\ not comma's

    then type cd Program Files\Java\jre1.8.0_251\bin (#remember to check the file name of jre properly)

    now type keytool -list -v -keystore "%USERPROFILE%.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android (without anyspace type the command).

    screenshot of the codes to run

    0 讨论(0)
  • 2021-02-11 14:58
    1. Add your JDK's /bin folder to the PATH environmental variable. You can do this under System settings > Environmental variables, or via CLI:

      set PATH=%PATH%;C:\Program Files\Java\jdk1.7.0_80\bin
      
    2. Close and reopen your CLI window

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