Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NoClassDefFoundError: opencard/core/opencardException

843851Jun 24 2002 — edited Jul 15 2002
Hi!, I am trying to get to work opencard with my system. I use Windows 2000, CHIDRIVE reader from TOWTO
KO and jcop cards from IBM.
I tried at first with a simple applet to read the applets from the card, but even that code isn't working. It compiles well but then it doesn't run. It gives me the error described in the subject. I use the import for all the classes I need so maybe it's a problem of the opencard.properties file that I wrote it wrong..

###############################
# Card service configuration #
###############################

OpenCard.services = \
com.ibm.opencard.factory.MFCCardServiceFactory \
opencard.opt.util.PassThruCardServiceFactory

###############################
# Card terminal configuration #
###############################

OpenCard.terminals = com.ibm.opencard.terminal.pcsc10.Pcsc10CardTerminalFactory \
com.ibm.opencard.terminal.ibm5948.IBMCardTerminalFactory|IBM5948-1|IBM5948-B02|1

###############################
# Trace configuration #
###############################

OpenCard.trace = opencard.core:6 opencard.opt:0 com.ibm.opencard:3 \
com.ibm.opencard.terminal.ibm5948.IBM5948CardTerminal:8


#Overriding OpenCard.property
OpenCard.property = new_value
OpenCard.property.override = true


Do I have to specify to the program any properties for the communication for the device or does it windows for me???

The code I am trying to get to work is:

import opencard.core.OpenCardException;
import opencard.core.util.OpenCardPropertyLoadingException;
import opencard.core.*;
import opencard.core.service.SmartCard;
import opencard.opt.applet.*;
import opencard.opt.iso.fs.FileAccessCardService;
import opencard.opt.iso.fs.CardFile;
import java.lang.*;
import java.util.*;
import java.io.*;

public class ViewApplets{

public static void main(String[] args){
System.out.println("hola hola");
AppletInfo[] templates = null;

try{
SmartCard.start();
CardRequest cr=
new CardRequest(CardRequest.NEWCARD,null,FileAccessCardService.class);
SmartCard sc = SmartCard.waitForCard(cr);

}catch (OpenCardException oce){
oce.printStackTrace(System.err);
}catch (ClassNotFoundException cnfe){
cnfe.printStackTrace(System.err);
}

finally {
try{
SmartCard.shutdown();

}catch (OpenCardException oce){

oce.printStackTrace(System.err);
}

}
System.exit(0);

}

}


If anybody could help me PLEASE!!! I would really apreciate it!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 12 2002
Added on Jun 24 2002
11 comments
344 views