Java keytool.exe 不是有效的 win32 应用程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8279546/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-15 00:36:29  来源:igfitidea点击:

keytool.exe is not a valid win32 application

javawindowskeytool

提问by Ti7a

Whenever I use any of those commands, I get "keytool.exe is not a valid win32 application" error, even when I open keytool.exeindependently as an exe file.

每当我使用这些命令中的任何一个时,我都会收到“keytool.exe 不是有效的 win32 应用程序”错误,即使我keytool.exe作为 exe 文件独立打开也是如此。

  1. C:\Program Files(x86)\Java\jre6\bin>keytool.exe -list -alias androiddebugkey -keystore "C:\Users\ti7a\.android\debug.keystore" -storepass android -keypass android

  2. keytool -list -keystore "C:\Users\ti7a\.android\debug.keystore"

  3. C:>cd C:\Program Files\Java\jre6\bin

    and then

    keytool -list -alias androiddebugkey -key store "C:\Users\ti7a\.android\debug.keystore" -storepass andro id -keypass android

  1. C:\Program Files(x86)\Java\jre6\bin>keytool.exe -list -alias androiddebugkey -keystore "C:\Users\ti7a\.android\debug.keystore" -storepass android -keypass android

  2. keytool -list -keystore "C:\Users\ti7a\.android\debug.keystore"

  3. C:>cd C:\Program Files\Java\jre6\bin

    进而

    keytool -list -alias androiddebugkey -key store "C:\Users\ti7a\.android\debug.keystore" -storepass andro id -keypass android

How is this caused and how can I solve it?

这是怎么引起的,我该如何解决?

回答by Chillie

I had the same problem. I looked at the size of the EXE file, and its size was 0kb.

我有同样的问题。我查看了EXE文件的大小,它的大小是0kb。

After a bunch of research, I came across a this: http://www.java.com/en/download/help/x64bits.xml

经过一堆研究,我遇到了这个:http: //www.java.com/en/download/help/x64bits.xml

It says to install the 32bit version to fix the problem. However I didn't like that idea, so I re-installed the 64bit version and it fixed the problem form me.

它说要安装 32 位版本来解决问题。但是我不喜欢这个想法,所以我重新安装了 64 位版本,它解决了我的问题。

You might want to check the size of your file to see if this could be your problem.

您可能想要检查文件的大小,看看这是否可能是您的问题。

回答by Wolfen

I faced the same problem. I found another keytool.exe inside of "C:\Program Files (x86)\Java\jdk1.7.0_03\jre\bin" I guess you used the keytool.exe inside of "C:\Program Files (x86)\Java\jdk1.7.0_03\bin"

我遇到了同样的问题。我在“C:\Program Files (x86)\Java\jdk1.7.0_03\jre\bin”中找到了另一个 keytool.exe 我猜你在“C:\Program Files (x86)\Java \jdk1.7.0_03\bin"

Wolfen

沃尔芬

回答by hedda

I copied keytool.exe from another server and replaced it on the machine throwing this error and that worked for me.

我从另一台服务器复制了 keytool.exe 并在抛出此错误的机器上替换了它,这对我有用。