問題描述
我正在嘗試使用 本文中的說明.當我輸入以下命令時:
C:ColdFusion8
untimejrelib>keytool -list -storepass changeit -noprompt -keystore
我收到以下錯誤:
<塊引用>'keytool' 不是內部或外部命令、可運行程序或批處理文件.
我檢查了包含我的 keytool 可執行文件的目錄是否在路徑中.(在我的 Windows 7 機器上,它位于 C:Program Files (x86)Javajre6in
)盡管如此,命令行將無法識別 keytool
命令.
我假設文檔中提到了兩個單獨的命令:
C:CFusionMX untimejrelib>keytool -list -storepass changeit -noprompt -keystore
C:CFusionMX untimejrelibsecuritycacerts
順便說一句,我可以使用以下過程而不是答案中提到的復雜步驟嗎?
- 當我在瀏覽器中打開 WSDL 時,我看到了 Lock 圖標,當我點擊它時會打開一個證書"窗口
然后我點擊安裝證書"選項
打開了一個證書導入向導窗口,我點擊了下一步,我看到了兩個選項
- a) 根據證書類型自動選擇證書存儲(此選項是自動選擇的)
- b) 將所有證書放在以下存儲中
我決定選擇選項 (b)
,但我很困惑我應該在這里選擇哪個證書存儲.
你得到這個錯誤是因為 keytool
可執行文件在 bin
目錄下,而不是 >lib
目錄在您的示例中.您還需要在命令行中添加 keystore
的位置.這里有一個很好的參考 - Jrun幫助/導入證書 |證書存儲 |冷融合
默認信任庫是 JRE 的 cacerts 文件.該文件通常位于以下位置:
服務器配置:
cf_root/runtime/jre/lib/security/cacerts
JRun 4 配置上的多服務器/J2EE:
jrun_root/jre/lib/security/cacerts
Sun JDK 安裝:
jdk_root/jre/lib/security/cacerts
查閱其他 J2EE 應用服務器和 JVM 的文檔
<小時><塊引用>
keytool 是 Java SDK 的一部分,可以在以下位置找到:
服務器配置:
cf_root/runtime/bin/keytool
JRun 4 配置上的多服務器/J2EE:
jrun_root/jre/bin/keytool
Sun JDK 安裝:
jdk_root/bin/keytool
查閱其他 J2EE 應用服務器和 JVM 的文檔
因此,如果您導航到 keytool
可執行文件所在的目錄,您的命令行將如下所示:
keytool -list -v -keystore JAVA_HOMEjrelibsecuritycacert -storepass changeit
您需要提供路徑信息,具體取決于您運行 keytool 命令的位置以及證書文件所在的位置.
另外,請確保您正在更新 ColdFusion 正在使用的正確 cacerts 文件.如果您在該服務器上安裝了多個 JRE.您可以在系統信息"下從管理員那里驗證 JRE ColdFusion 是否正在使用.查找 Java Home 行.
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
untimejrelib>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)Javajre6in
)
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 untimejrelib>keytool -list -storepass changeit -noprompt -keystore
C:CFusionMX untimejrelibsecuritycacerts
EDIT:
By the way can I use the following process instead of complex steps mentioned in the answer?
- When I opened the WSDL into my browser, I saw the Lock icon, when I clicked on it a "Certificate" window opened
Then I clicked on "Install Certificate" option
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.
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_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.
這篇關于Keytool 未被識別為內部或外部命令的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!