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
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_HOME\jre\lib\security\cacert -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
Check that the directory the keytool executable is in is on your %PATH%
environment variable.
For example, on my Windows 7 machine, it is in C:\Program Files (x86)\Java\jre6\bin
, and my %PATH%
variable looks like C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Java\jre6\bin;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
(and many other entries)
keytool : The term 'keytool' is not recognized as the name of a cmdlet, function, script file, or operable program
Create a keystore
If you have an existing keystore, skip to the next step. If not, create one by running the following at the command line:
keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
Note: Keep this file private; do not check it into public source control.
Note: keytool may not be in your path. It is part of the Java JDK, which is installed as part of Android Studio. For the concrete path, run flutter doctor -v and see the path printed after ‘Java binary at:’, and then use that fully qualified path replacing java with keytool.
Reference the keystore from the app
Create a file named appdir/android/key.properties that contains a reference to your keystore:
storePassword=password from previous step
keyPassword=password from previous step
keyAlias=key
storeFile=location of the key store file, e.g. /Users/user name/key.jks
def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
Check the Description of this Tutorial: https://www.youtube.com/watch?v=nGvPNG-f1-o
OR Generate key using a tool
Download app Signing tool from : https://shatter-box.com/knowledgebase/android-apk-signing-tool-apk-signer/
Go To the Directory Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
Then type cmd and Enter
enter image description here
Follow Along to the video tutorial to generate the key, place the key anywhere you want then follow the next tutorial to wrap the key with app with the 1st tutorial.
keytool' is not recognized as an internal or external command
That happens because you haven't added the bin directory of your JAVA_HOME
environment variable in your %PATH%
.
- Add the environment variable
JAVA_HOME
with path C:\Program Files\Java\jdk1.8.0_131 without the bin directory. - Add the
%JAVA_HOME%\bin
directory at the end of your%PATH%
.
Keytool command not recognized
The Keytool command can only be ran if you have added it to your path or from within the directory where it is located.
If you are on Windows, most likely it is located here:
C:\Program Files\Java\\bin
You'll need to either run the keytool command from there, or add the keytool location to your PATH environment variable.
How to solve 'flutter' is not recognized as an internal or external command, operable program or batch file.?
Your Path was set temporarily and non permanently. Checking the official docs, you can get the answer:
Using MacOS:
- temporarily will be: export PATH="$PATH:`pwd`/flutter/bin"
- permanently:
- export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin"
- source $HOME/.rc file
- echo $PATH
Official DOCS
Using Windows:
- From the Start search bar, enter ‘env’ and select Edit environment variables for your account.
- Under User variables check if there is an entry called Path
Official DOCS
Pub is not recognized as internal or external command
If you have Flutter in C:\src\flutter
, you can add path variable: C:\src\flutter\bin\cache\dart-sdk\bin
(if you have Flutter in another localization, just replace the beginning of the path analogically) and restart your command line tool (or IDE).
You can add flutter
prefix before pub
as well: flutter pub global activate get_cli
- according to flutter -h
:
flutter pub
- pass the remaining arguments to Dart's "pub" tool
Openssl is not recognized as an internal or external command
Well at the place of OpenSSL ... you have to put actually the path to your OpenSSL folder that you have downloaded. Your actual command should look like this:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | "C:\Users\abc\openssl\bin\openssl.exe" sha1 -binary | "C:\Users\abc\openssl\bin\openssl.exe" base64
Remember, the path that you will enter will be the path where you have installed the OpenSSL.
Edit:
you can download OpenSSL for windows 32 and 64 bit from the respective links below:
OpenSSL for 64 Bits
OpenSSL for 32 Bits
Related Topics
Install_Failed_Update_Incompatible When I Try to Install Compiled .Apk on Device
Google Android Usb Driver and Adb
Display Fragment Viewpager Within a Fragment
Use a Custom Contextual Action Bar for Webview Text Selection
Get Uri of .Mp3 File Stored in Res/Raw Folder in Android
Method Not Found Using Digestutils in Android
Using Global Exception Handling on Android
How to Find and Turn on Usb Debugging Mode on Nexus 4
How to Start/ Launch Application at Boot Time Android
How to Add Onclick Listener to Recycler View
High Resolution Image - Outofmemoryerror
Error: "Adb Connection Error:An Existing Connection Was Forcibly Closed by the Remote Host"