Java Card Connecting To a Simulator failed

喜你入骨 提交于 2019-12-08 01:22:53

问题


I am trying to test a Java Card applet to establish a connection to a simulator such as cref:

try {
    sckClient = new Socket("localhost", 9025);
    InputStream is = sckClient.getInputStream();
    OutputStream os = sckClient.getOutputStream();
    cad = CadDevice.getCadClientInstance(CadDevice.PROTOCOL_T0, is, os);
} catch (Exception e) {
    System.out.println("error");
    return;
}

try {
    cad.powerUp();
} catch (IOException e) {
    e.printStackTrace();
} catch (CadTransportException e) {
    System.out.println("error");
    try {
        sckClient.close();
    } catch (IOException e1) {
        e1.printStackTrace();
    }
    return;
}

My code get stuck in powerUp without any error or exception. I am using the sample_device and sample_platform that comes with Java Card Development Kit 3.0.5u1

来源:https://stackoverflow.com/questions/41675985/java-card-connecting-to-a-simulator-failed

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!