问题
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