Java Security Class无法找到 [英] Java Security Class Couldn't be found

查看:219
本文介绍了Java Security Class无法找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当启动我的程序时,下一个错误弹出

When launching my program the next error pops out


java.lang.NoClassDefFoundError:无法初始化类javax.crypto.SunJCE_b

java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.SunJCE_b

这意味着这个类是缺少的,虽然我已经手动找到这个类,通过jar / ide工作,但不能通过服务。

which means this class is missing although I've found this class manually, works via jar/ide but doesn't works prefectly via service.

也许我需要做一些修改?但是哪个?
提前感谢

Maybe I need to make a few modifications? but which? Thanks in advance

推荐答案

我不知道这是否与 问题,但是由于我正在使用的JCE策略文件的版本,我遇到了完全相同的行为。

I don't know if this is relevant to your problem but I was experiencing the exact same behavior due to versions of the JCE Policy files I was using.

使用正确的无限力量加密版本为我解决了这个问题。我相信我可能不小心安装了Java 7的扩展,而不是6.(我正在使用Java 6编译)

Using the proper Unlimited Strength Cryptography Extenstions solved this issue for me. I believe I might have accidentally installed the extensions for Java 7 as opposed to 6. (I was using Java 6 for compilation)

对于Windows机器,应该安装在您安装的JDK的jre / lib / security文件夹中,例如:c:\program files\Java\jdk1.6.0_33\jre\lib\security

For a windows machine, they should be installed in the jre/lib/security folder of your installed JDK, for example: c:\program files\Java\jdk1.6.0_33\jre\lib\security

这篇关于Java Security Class无法找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆