记一个java在64位windows上的BUG

package org.example.crypto;

import java.security.KeyStore;
import java.security.KeyStoreException;

public class LoadKeystore
{
    public static void main(String[] args) throws KeyStoreException
    {
        KeyStore keystore = KeyStore.getInstance("Windows-MY");
        System.out.println(keystore.aliases());
    }
}

 

exception 写道
Exception in thread "main" java.security.KeyStoreException: Windows-MY not found
at java.security.KeyStore.getInstance(KeyStore.java:587)
at org.example.crypto.LoadKeystore.main(LoadKeystore.java:10)
Caused by: java.security.NoSuchAlgorithmException: Windows-MY KeyStore not available
at sun.security.jca.GetInstance.getInstance(GetInstance.java:142)
at java.security.Security.getImpl(Security.java:659)
at java.security.KeyStore.getInstance(KeyStore.java:584)

 

sun 异常描述 写道
Bug ID: 6931562
Votes 0
Synopsis Support SunMSCAPI Security Provider in Windows 64-bit releases of JVM
Category jce:sunmscapi
Reported Against
Release Fixed 7(b142)
State 11-Closed, Unverified, bug
Priority: 3-Medium
Related Bugs 7035058
Submit Date 03-MAR-2010
Description A DESCRIPTION OF THE REQUEST :
JRE 1.6.0_u18, for 64-bit Windows Vista does not appear to contain the sun.security.mscapi.SunMSCAPI security provider. The classes, supporting DLL, and security provider mapping in the java.security policy file are absent.
At runtime, the security API reports that it cannot locate the Windows-MY keystore. Documentation for the SunMSCAPI Provider does not indicate that support is only available on certain Windows platforms.
http://java.sun.com/javase/6/docs/technotes/guides/security/SunProviders.html#SunMSCAPI

The 32-bit distribution for the same version and operating system includes this feature.

If implementation is impossible, due to limitations of the host platform, treat this as a bug, for which the end product would be updated documentation to warn future engineers of the missing feature.

JUSTIFICATION :
Provide feature consistency between JVM implementations runnable on the same host platform. Provide upgrade-path for code written against 32-bit JVM features.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The 64-bit Windows JVM implementations should provide access to the Windows-MY and Windows-ROOT keystores.
ACTUAL -
JVM indicates that it cannot locate the Windows-MY keystore.

 
跟帖 写道
Submitted On 10-MAR-2011
tomasgarciameras It's very easy to compile sunmscapi.dll as a x64 Windows DLL with Microsoft Visual Studio. It works without problems.


Submitted On 10-MAR-2011
tomasgarciameras It's very easy to compile sunmscapi.dll as a x64 Windows DLL with Microsoft Visual Studio. It works without problems.


Submitted On 10-MAR-2011
tomasgarciameras It's very easy to compile sunmscapi.dll as a x64 Windows DLL with Microsoft Visual Studio. It works without problems.

 

 

    但采用JAVA7,oracle解决了这个BUG

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值