Tried many answers to get my keytool.exe to open but failed

心已入冬 提交于 2019-12-01 11:15:08

问题


I was trying to get keytool.exe running but the command prompt disappear so fast as soon as i open it.

I also tried to manually type in the command prompt

C:\Program Files\Java\jdk1.6.0_25\bin

it says 'program' is not recognized as an internal or external command, operable program or batch file. I was unable to open program file folder itself.

I went to environment variables and change the path to

1)C:\Program Files\Java\jdk1.6.0_25\bin 2)C:\Program Files\ and more diff related path, etc etc but the result in command prompt is still giving me that error.

when i type in 'C:>java' it showed the list (I attached the screen shot picture of the cmd but new users not allowed)

i followed this direction from this link

I can’t find the Android keytool

and none of them were able to solve my problem. Am I missing anything else? I hope to solve this problem soon.

!!!UPDATED!!!

I found out that I have to type in cd before the path

"cd C:\Program Files\Java\jdk1.6.0_25\bin"

I assumed that if i type in C: and press enter it would change directory to C: and after I can type the path from there but always getting error even at "Program Files" itself.

Thanks everyone!

here was the example in my command prompt

C:>Program Files\Java\jdk1.6.0_25\bin

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

added the 'cd' before the path and...

C:>cd C:\Program Files\Java\jdk1.6.0_25\bin

C:\Program Files\Java\jdk1.6.0_25\bin>


回答1:


Instead of opening keytool.exe right away, open cmd, then cd your way to keytool.exe's directory. From there run keytool.exe [parameters]. The prompt will stay open and you can see what is going on.




回答2:


From the command line try quoting the command (because of the space in Program Files):

"C:\Program Files\Java\jdk1.6.0_25\bin\keytool.exe"


来源:https://stackoverflow.com/questions/5983946/tried-many-answers-to-get-my-keytool-exe-to-open-but-failed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!