SunTlsRsaPremasterSecret KeyGenerator not available

前端 未结 8 1740
逝去的感伤
逝去的感伤 2020-11-30 14:00

I encountered an error when my application tries to load a RSA Algorithm provider class from JAVA. The exception stack is as follow:

javax.jms.JMSException:          


        
相关标签:
8条回答
  • 2020-11-30 14:33

    I think we find the root cause so here is an answer of my own question.

    1. the Java system property "java.ext.dirs" in Mac OS X 10.5 is: /Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext. The sunjce_provider.jar should be in /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext but also be found in /Library/Java/Extensions/ in the problem mac.

    2. the sunjce_provider.jar in /Library/Java/Extensions/ belongs to Java Cryptography Extension(JCE) 1.2.2, which has been installed in the mac. JCE 1.2.2 is an optional package of J2SE 1.3.1 and may not includes enough libraries for J2SE 1.4 and later.

    3. the Java applcation works normally after all JCE 1.2.2 related jar files have been removed from /Library/Java/Extensions/.

    0 讨论(0)
  • 2020-11-30 14:37

    had a similar issue. Adding the classpath to the ext directory fixed it for me. This fix worked for me on windows 7 with java 1.6

    java -Djava.ext.dirs=lib -classpath "%java_home%\lib\ext\*" myapp.jar 
    
    0 讨论(0)
提交回复
热议问题