本文介绍了javafx上的sun.security.pkcs11的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我尝试开发一个访问智能卡的javafx应用程序。I try to develop a javafx aplication that access a smartcard.我有一个简单的概念证明,如下所示:I have a simple proof of concept, like this:package javafxapplication7;import java.net.URL;import java.util.ResourceBundle;import javafx.event.ActionEvent;import javafx.fxml.FXML;import javafx.fxml.Initializable;import javafx.scene.control.Label;import sun.security.pkcs11.SunPKCS11;public class SampleController implements Initializable { @FXML private Label label; @FXML private void handleButtonAction(ActionEvent event) { SunPKCS11 a = new SunPKCS11(); } @Override public void initialize(URL url, ResourceBundle rb) { // TODO }}且exepcion为:and the exepcion is:Caused by: java.lang.NoClassDefFoundError: sun/security/pkcs11/SunPKCS11at javafxapplication7.SampleController.handleButtonAction(SampleController.java:26)推荐答案只需在64位JDK的旁边(或代替)安装32位JDK,并确保编译和使用32位版本对JAR / COD文件进行签名。Just install a 32bit JDK along side (or instead) of your 64 bit JDK, and make sure you compile and sign the JAR/COD file with the 32 bit version.实际上它是64位版本中的错误.. http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=f1279f413fd19e3a247022d6dcca9 ?bug_id = 7105065我在以下讨论中找到了它: -I found it in the following discussions :- http://www.java.net/node/703858 http://tai-dev.blog.co.uk/2009/11/11/are-you-seeing-the-java- lang-noclassdeffounderror-sun-security-pkcs11-sunpkcs11-error-when-signing-your-rim-blackberry-j2me-apps-7352729 / http://community.igniterealtime.org/thread/30821 这篇关于javafx上的sun.security.pkcs11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-03 19:25
查看更多