连接到模拟器的Java卡失败

时间:2017-01-16 12:01:25

标签: java javacard apdu

我正在尝试测试Java Card小程序以建立与模拟器的连接,例如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;
}

我的代码卡在powerUp中,没有任何错误或异常。 我正在使用 Java Card Development Kit 3.0.5u1

附带的 sample_device sample_platform

0 个答案:

没有答案