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:
C:\CFusionMX\runtime\jre\lib>keytool -list -storepass changeit -noprompt -keystore
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?
Then I clicked on "Install Certificate" option
A Certificate Import Wizard window opened, I clicked on Next I saw two options
I decided to select option (b)
, but I'm confused which certificate store I should select here.
This question is related to
java
coldfusion
keytool
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
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.
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
Close and reopen your CLI window
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\
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
Run the cmd as run as administrator this worked for me
Source: Stackoverflow.com