OCF and cref integration problem

Hi everybody;

I am trying to write an application which is interconnected with a smart card. In this manner, I make use of OCF and emulate smart card environment with cref. For this purpose I modified opencard.properties file as follows:

OpenCard.services = \

opencard.opt.util.PassThruCardServiceFactory \

com.sun.javacard.ocfrmiclientimpl.OCFCardAccessorFactor

OpenCard.terminals =

com.sun.javacard.crefterminal.CrefCardTerminalFactory|cref|CREF|localhost:9025

OpenCard.services.override = true

OpenCard.terminals.override = true

OpenCard.trace.override = true

And I implemented below code for the application side;

SmartCard.start();

// Wait for a smart card

CardRequest cr = new CardRequest(CardRequest.NEWCARD, null,

OCFCardAccessor.class);

System.out.println("try1");

SmartCard myCard = SmartCard.waitForCard(cr);

System.out.println("try2");

Up to here everything is fine but when I run the application and emulator (it doesnt matter which one is run first or second), application side program always waits on SmartCard myCard = SmartCard.waitForCard(cr); statement. I think application waits a smartcard which needs to be inserted into the reader but I couldnt figure this out with cref. Is there anybody who has any idea how to solve this problem? Thanks very much in advance.

[1429 byte] By [erkanyalcinkayaa] at [2007-11-27 10:38:06]
# 1

I found the solution. cref with -i option.

Regards...

erkanyalcinkayaa at 2007-7-28 18:52:23 > top of Java-index,Java Mobility Forums,Consumer and Commerce...