无法在 AIX 的 1.7 java 中找到 KeyTool class

Not able to find KeyTool class in 1.7 java for AIX

我正在尝试使用 JarSigner API 使用 java 1.7 对 jar 进行签名。这在 Linux 和 Windows 机器上有效,但在 AIX 机器上失败并出现 classnotfound 异常(对于 class "sun.security.tools.KeyTool")。

我也找不到 class "com.ibm.crypto.tools.KeyTool" 的 jar,IBM 说它是替代品。

在IBM/Java6中,有一个$JRE_HOME/lib/rt.jar(sun/security/tools/JarSigner.class)和一个$JRE_HOME/lib/ext/ibmjceprovider(com/ibm/crypto/tools/KeyTool.class)

在IBM/Java7中,有$JDK_HOME/lib/tools.jar(sun/security/tools/JarSigner.class)$JRE_HOME/lib/ext/ibmjceprovider(com/ibm/crypto/tools/KeyTool.class)

您可以将此 'tools.jar' 添加到 CLASSPATH

请注意,在IBM/Java8中没有sun/security/tools/JarSigner.class$JDK_HOME/lib/tools.jar中,但是有sun/security/tools/jarsigner/Main.class