Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keytool is not recognized as an internal or external command

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:\ColdFusion8\runtime\jre\lib>keytool -list -storepass changeit -noprompt -keystore 

I got the following error:

'keytool' is not recognized as an internal or external command, operable program or batch file.

I checked that the directory containing my keytool executable is in the path. (On my Windows 7 machine, it's in C:\Program Files (x86)\Java\jre6\bin) Despite this, the command line will not recognise the keytool command.

I'm assuming that there are two separated commands mentioned in the doc:

  1. C:\CFusionMX\runtime\jre\lib>keytool -list -storepass changeit -noprompt -keystore

  2. C:\CFusionMX\runtime\jre\lib\security\cacerts

EDIT:

By the way can I use the following process instead of complex steps mentioned in the answer?

  1. When I opened the WSDL into my browser, I saw the Lock icon, when I clicked on it a "Certificate" window opened
  2. Then I clicked on "Install Certificate" option

  3. A Certificate Import Wizard window opened, I clicked on Next I saw two options

    • a) Automatically select the certificate store based on the type of certificate (this option was selected automatically)
    • b) Place all certificates in the following store

I decided to select option (b), but I'm confused which certificate store I should select here.

like image 599
Jack Avatar asked Oct 17 '13 16:10

Jack


People also ask

How do you fix Keytool is not recognized as an internal or external command?

all you have to do is go to environment variables, click PATH to make it active, then click edit, then add complete path where your keytool is, for me i will add C:\Program Files\Java\jre7\bin this will allow you to execute keytool commands without going to the directory where keytool is installed.

How do I know if Keytool is installed Windows?

To verify that the keytool utility is available (For Microsoft Windows) Type keytool.exe and press Enter. (For UNIX) Type keytool and press Enter. You can use the keytool utility from Oracle JDK Java 1.5 or 1.6.

Where do I run Keytool command?

I found that only keytool -list -v -alias androiddebugkey -keystore %USERPROFILE%\. android\debug. keystore worked for me.


1 Answers

  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

like image 120
martoncsukas Avatar answered Sep 19 '22 06:09

martoncsukas