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

You are getting that error because the keytool executable is under the bin directory, not the lib directory in your example. And you will need to add the location of your keystore as well in the command line. There is a pretty good reference to all of this here - Jrun Help / Import certificates | Certificate stores | ColdFusion

Show

The default truststore is the JRE's cacerts file. This file is typically located in the following places:

  • Server Configuration:

    cf_root/runtime/jre/lib/security/cacerts

  • Multiserver/J2EE on JRun 4 Configuration:

    jrun_root/jre/lib/security/cacerts

  • Sun JDK installation:

    jdk_root/jre/lib/security/cacerts

  • Consult documentation for other J2EE application servers and JVMs


The keytool is part of the Java SDK and can be found in the following places:

  • Server Configuration:

    cf_root/runtime/bin/keytool

  • Multiserver/J2EE on JRun 4 Configuration:

    jrun_root/jre/bin/keytool

  • Sun JDK installation:

    jdk_root/bin/keytool

  • Consult documentation for other J2EE application servers and JVMs

So if you navigate to the directory where the keytool executable is located your command line would look something like this:

keytool -list -v -keystore JAVA_HOMEjrelibsecuritycacert -storepass changeit

You will need to supply pathing information depending on where you run the keytool command from and where your certificate file resides.

Also, be sure you are updating the correct cacerts file that ColdFusion is using. In case you have more than one JRE installed on that server. You can verify the JRE ColdFusion is using from the administrator under the 'System Information'. Look for the Java Home line.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…

ERROR:keytool is not recognized as an internal or external command, operable program or batch file

Questions : ERROR:keytool is not recognized as an internal or external command, operable program or batch file

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00

550

When I use the command:

C:\>keytool -list -alias androiddebugkey -keystore .android\debug.keystore -storepass android -keypass android

I get this error:

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

I'm not able to get the certificate anycodings_keytool fingerprint(MD5) on my computer.

I have ensured that the keystore file is anycodings_keytool present in the appropriate location.

Any help?

Total Answers 30

29

Answers 1 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

Check that the directory the keytool anycodings_android executable is in is on your %PATH% anycodings_android environment variable.

For example, on my Windows 7 machine, it anycodings_android is in C:\Program Files anycodings_android (x86)\Java\jre6\bin, and my %PATH% anycodings_android variable looks like C:\Program Files anycodings_android (x86)\Common anycodings_android Files\Oracle\Java\javapath;C:\Program anycodings_android Files anycodings_android (x86)\Java\jre6\bin;C:\WINDOWS\System32\WindowsPowerShell\v1.0\ anycodings_android (and many other entries)

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

mRahman

3

Answers 2 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

This worked for me !! :

Go to this path or where ever you have anycodings_android your keytool.exe file

C:\Program Files\Java\jre7\bin

Hold shift and right click -> then anycodings_android press Open command window here

terminal will pop up, paste this in:

keytool -list -v -keystore "C:\Users\"Your-User-Name(no quotes)"\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android

gives you both MD5 and SHA1

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

raja

5

Answers 3 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

Found it.

GO TO:

my computer->rightClick->properties->Advanced system settings->environment variables->find path in system variables->dbl click-> paste the "C:\Program Files\Java\jdk1.6.0_16\bin"->OK

GO TO:

cmd -> keytool -list -alias androiddebugkey -keystore "C:\Users\meee\.android\debug.keystore" -storepass android -keypass android

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

jidam

1

Answers 4 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

  1. Go to My computer -> right click anycodings_android -> system properties -> anycodings_android environmental variables -> Path anycodings_android -> add you jdk/bin to this path

    C:\Program Files\Java\jdk1.8.0_211\bin

*if this not work then

  1. In cmd set the path by using the below anycodings_android command

    set PATH=C:\Program Files\Java\jdk1.8.0_211\bin

now the path is set now you can use the anycodings_android keytool

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

joy

5

Answers 5 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

So if you have the following structure anycodings_android now:

C:\Program Files\Java\jre6\bin\ keytool.exe debug.keystore

then execute:

C:\Program Files\Java\jre6\bin>keytool -list -alias androiddebugkey -keystore debug.keystore -storepass android -keypass android

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

raja

3

Answers 6 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

keytool ships with Android Studio as anycodings_android part of the JRE needed to run Android anycodings_android Studio.

On Windows its: C:\Program anycodings_android Files\Android\Android anycodings_android Studio\jre\bin\keytool.exe

On Mac its: /Applications/Android anycodings_android Studio.app/Contents/jre/jdk/Contents/Home/bin/keytool

Add it to your environment variables anycodings_android then run the keytool command again.

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

joy

1

Answers 7 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

On windows 8, go to C:\Program anycodings_android Files\Java\jre7\bin and in the address anycodings_android bar, type "cmd" without the quotes. This anycodings_android will launch the terminal. Then type in anycodings_android string as describe here.

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

jidam

4

Answers 8 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

if you want to run keytool from any anycodings_android location of terminal

example: C:>keytool

you need to add the system variables

for Windows:

1) create: JAVA_HOME C:\Program Files\Java\jdk1.7.0_45 2) add to Path %JAVA_HOME%\bin;

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

raja

4

Answers 9 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

all you can do is to navigate to your anycodings_android jre destination in your computer via anycodings_android command line and then once you reach anycodings_android bin, you type the keytool command and it anycodings_android would work.

C:\Program Files (x86)\Java\jre7\bin> C:\Program Files (x86)\Java\jre7\bin>keytool -list -v -keystore"%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android Alias name: androiddebugkey Creation date: 23 Feb, 2014 Entry type: PrivateKeyEntry Certificate chain length: 1 Certificate[1]: Owner: CN=Android Debug, O=Android, C=US Issuer: CN=Android Debug, O=Android, C=US Serial number: 479d4fe7 Valid from: Sun Feb 23 06:19:02 IST 2014 until: Tue Feb 16 06:19:02 IST 2044 Certificate fingerprints: MD5: DB:6A:8E:48:22:5B:37:73:B1:91:EF:43:3F:26:F0:EC SHA1: B4:6B:2E:5F:5A:30:C5:E4:E7:12:BB:F0:74:FC:2B:43:64:3A:FC:15 SHA256: CB:59:F3:20:7D:5B:87:99:6C:0D:32:79:79:CF:4E:8C:16:C2:37:81:7B: B0:AF:D2:EC:3C:11:21:53:58:62:F6 Signature algorithm name: SHA256withRSA Version: 3 Extensions: #1: ObjectId: 2.5.29.14 Criticality=false SubjectKeyIdentifier [ KeyIdentifier [ 0000: FA 96 17 9E 94 73 C3 42 F0 4B 55 5B C7 5B EE BB .....s.B.KU[.[.. 0010: C3 E5 D3 61 ...a ] ]

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

jidam

1

Answers 10 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

Make sure JAVA_HOME is set and the path anycodings_android in environment variables reflects the anycodings_android bin directory of JAVA_HOME. Basically, anycodings_android the PATH should be able to find the anycodings_android keytools.exe file in your jdk location.

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

jidam

2

Answers 11 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

Easy, just find the location where anycodings_android keytool executable is, normally is in anycodings_android java/jre(Version)/bin forexample in my anycodings_android computer is in C:\Program anycodings_android Files\Java\jre7\bin. all you have to do anycodings_android is go to environment variables, click anycodings_android PATH to make it active, then click edit, anycodings_android then add complete path where your anycodings_android keytool is, for me i will add C:\Program anycodings_android Files\Java\jre7\bin this will allow you anycodings_android to execute keytool commands without anycodings_android going to the directory where keytool is anycodings_android installed.

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

miraj

1

Answers 12 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

This is due to path for keytool.exe not anycodings_android set.

Open command prompt in your windows anycodings_android machine, go to where you would like to anycodings_android run keytool cmd and then set path where anycodings_android keytool.exe present

Step 1 : Open cmd promt and run

cd C:\Program Files\Java\jdk1.8.0_131\jre\lib\security

Step 2 : Run below cmd to set path using

set PATH=C:\Program Files\Java\jdk1.8.0_131\bin

Step 3 : Run keytool cmd, now it will be anycodings_android able to recognize

keytool -list -alias <rest of the arguments>

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

jidam

4

Answers 13 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

This means, that your shell couldn't anycodings_android find the tool on your harddisk.

A)

  • Change the working directory to C:\Program Files\Java\jre6\bin\
  • Execute keytool -list -alias androiddebugkey keystore <full directory name make sure that you use enclosing in quotes> -storepass android -keypass android

B)

  • Add C:\Program Files\Java\jre6\bin\ to your PATH variable

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

joy

1

Answers 14 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

I suffered alot trying to find a anycodings_android solution to it and finally I found the anycodings_android solution by first setting the jre path anycodings_android 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 anycodings_android to your JDK's bin folder.

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

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

then copy and paste the code below in anycodings_android cmd

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

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

joy

1

Answers 15 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

In my case problem was in using anycodings_android PowerShell instead of CMD :)

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

joy

2

Answers 16 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

i am using gui tool ,Must try Who don't anycodings_android want to use keystore command line

it is GUI tool for create keystore.jks anycodings_android and export pem file and lot

https://keystore-explorer.org/downloads.html

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

joy

1

Answers 17 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

Give:

keytool -list -keystore ~/.android/debug.keystore

Also in your line there is a space in anycodings_android keystore. Please check it.

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

joy

2

Answers 18 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

I know there are already several answers anycodings_android but none of them worked for me, so i am anycodings_android posting one that worked for me, may be anycodings_android helpful for someone.

First of all directory to keytool.exe anycodings_android must be on path

and if instead of directory being on anycodings_android path it is giving error then Try anycodings_android starting command line as a normal user anycodings_android instead of as a administrator or anycodings_android changing the directory to home directory

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

joy

4

Answers 19 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

Open "Environment Variables" (you can anycodings_android get to it from your start menu search in anycodings_android Win10) double check the path that the anycodings_android jdk is in, to make sure it exists. For anycodings_android me, it said "...jdk1.8/bin" But when I anycodings_android copied that into Windows Explorer or anycodings_android command prompt, it said that it didn't anycodings_android exist. I checked where it should have anycodings_android been, and it said "jdk1.8.0_77"

A simple rename of the setting in anycodings_android Android Studio and keytool was working!

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

miraj

3

Answers 20 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

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

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

jidam

1

Answers 21 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

  1. Go to C:->Program Files->Java->jdk->bin. Here,keytool.exe file resides. 2.Copy the path till bin. 3.Go to: Control Panel\System and Security\System 4.Click Advanced System Setting 5.Click Environment Variables 6.Under System Variables(bottom half): Double click on Variable: Path B. Add the path: (Click New then add) C:\Program Files\Java\jdk1.8.0_191\bin (your path) 8.VERIFY: Open command prompt & enter "Keytool" It should show keytool details & no error mssg.

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

miraj

3

Answers 22 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

add C:\Program Files\Java\jdk-15.0.1\bin anycodings_android this into Environment Variables. refer anycodings_android to this website.

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

jidam

2

Answers 23 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

That simply means the keytool keyword is anycodings_android not installed in your system visit : anycodings_android visit here and download java JDK first.

Then set the java JDK in your anycodings_android environmental variable.

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

jidam

5

Answers 24 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

The Works for fine

Go to Path

C:\Program Files\Java\jre7\bin> keytool -exportcert -alias androiddebugkey -keystore "C:\Users\Developer\.android\debug.keystore"

Then enter Ketsore Password and job anycodings_android done!!

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

raja

6

Answers 25 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

Open Command prompt type this..

"c:\Program anycodings_android Files(x86)\Java\jdk1.7.0\bin\keytool.exe" anycodings_android -list -v -alias androiddebugkey anycodings_android -keystore anycodings_android "C:\Users\EIS.android\debug.keystore" anycodings_android -storepass android -keypass android

Then Hit Enter MD5 and SHA1 key will anycodings_android get

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

raja

2

Answers 26 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

For windows 10 you need to path anycodings_android C:\Program Files\Java\jre1.8.0_161\bin

restart command and open

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

raja

2

Answers 27 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

Locate where your keytool.exe inside anycodings_android java installation folder

mine is C:\Program anycodings_android Files\Java\jre1.8.0_181\bin open cmd anycodings_android anywhere and run

SET PATH=%PATH%;C:\Program Files\Java\jre1.8.0_181\bin;

change the path to the path you located anycodings_android your keytool.exe

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

raja

3

Answers 28 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

My case is, it doesn't work wherever I anycodings_android call it, no matter I path the file or anycodings_android not, if I open it with powershell.

but it works if I open it with cmd.

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

joy

3

Answers 29 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

Just search on the following path : C:\ anycodings_android → Program Files → anycodings_android Java → jre1.xxx → anycodings_android bin be sure this bin folder includes anycodings_android this keytool.exe

Then open the command prompt.

then type : (cd means change anycodings_android directory) cd C:\Program anycodings_android Files\Java\jre1.8.0_231\bin

Then type the command, and press enter

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

joy

3

Answers 30 : of ERROR:keytool is not recognized as an internal or external command, operable program or batch file

The keytool command might not be in your anycodings_android path—it’s part of anycodings_android Java, which is installed as part of anycodings_android Android Studio. For the concrete path, anycodings_android run flutter doctor -v and locate the anycodings_android path printed after ‘Java anycodings_android binary at:’. Then use that anycodings_android fully qualified path replacing java (at anycodings_android the end) with keytool. If your path anycodings_android includes space-separated names, such as anycodings_android Program Files, use platform-appropriate anycodings_android notation for the names. For example, on anycodings_android Mac/Linux use Program\ Files, and on anycodings_android Windows use "Program Files".

0

2022-08-04T02:32:19+00:00 2022-08-04T02:32:19+00:00Answer Link

jidam

How do you fix Keytool is not recognized as an internal or external command operable program or batch file?

This is due to path for keytool.exe not set..
Change the working directory to C:\Program Files\Java\jre6\bin\.
Execute keytool -list -alias androiddebugkey keystore <full directory name make sure that you use enclosing in quotes> -storepass android -keypass android..

Why is Keytool not working?

This message keytool is not recognized as an internal or external command, operable program or batch file. may occur if the path of your java sdk has not been set globally.

How do I know if Keytool is installed Windows?

keytool is located in JDK bin directory ($JAVA_HOME/bin). JAVA_HOME is your JDK installation directory. To use that command line you should also include $JAVA_HOME/bin to your PATH environment variable.

How do I install Keytool?

Windows.
Download and install a recent version of the JRE from Oracle..
Locate the keytool with two commands. ... .
Add the directory where keytool.exe resides to the PATH variable. ... .
Return to a directory that belongs to your user name: ... .
Repeat steps 2 and 3 for any terminal window in which you want to use the keytool command..