you're missing the brackets around the catch statement, just like the error 
message says

>} catch OpenCard Exceptions {

should be

}
catch ( OpenCard Exceptions )
{

...

-- Sean

At 11:49 AM 4/02/01 -0400, you wrote:
>Hi,
>What is the hidden problem in this code?
>My compiler is sdk1.3.
>And i couldn't compile also this code with Visual Cafe.
>Any ideas ??
>
>CODE-->
>import opencard.core.terminal.Slot;
>import opencard.core.terminal.CardTerminal;
>import opencard.core.service.SmartCard;
>
>public class card implements CTListener {
>private SmartCard smartcard = null;
>private CardTerminal terminal=null;
>private int slotID = 0;
>
>
>public void register()
>{
>EventGenerator.getGenerator().addCTListener(this);
>try {
>EventGenerator.getGenerator().createEventsForPresentCards(this);
>} catch (Exception e) {
>e.printStackTrace(System.err);
>}
>}
>
>public void unregister()
>{
>EventGenerator.getGenerator().removeCTListener(this);
>}
>
>public void cardInserted(CardTerminalEvent event)
>{
>if (smartcard == null) {
>try {
>smartcard = SmartCard.getSmartCard(event);
>terminal = event.getCardTerminal();
>slotID = event.getSlotID();
>} catch OpenCard Exceptions {
>// handle error...
>}
>}
>}
>
>public void cardRemoved(CardTerminalEvent event)
>{
>if ((event.getSlotID() == slotID) &&(event.getCardTerminal()==terminal)) {
>smartcard = null;
>terminal = null;
>slotID = null;
>}
>}
>}
>
>
><--
>
>ERROR message-->
>@echo off
>call C:\OpenCard\OCF1.2\\demos\setenv.bat
>
>echo Starting demo...
>javac -classpath %OCF_CLASSPATH% card.java
>pause
>card.java:36: '(' expected
>} catch OpenCard Exceptions {
>^
>card.java:38: <identifier> expected
>}
>^
>card.java:42: illegal start of expression
>public void cardRemoved(CardTerminalEvent event)
>^
>card.java:49: ';' expected
>}
>^
>card.java:50: '}' expected
>}
>^
>card.java:8: card should be declared abstract; it does not define
>cardRemoved(op
>encard.core.event.CardTerminalEvent) in card
>public class card implements CTListener {
>^
>Note: card.java uses or overrides a deprecated API.
>Note: Recompile with -deprecation for details.
>-->ERROR Message
>
>
>______________________________________________
>FREE Personalized Email at Mail.com
>Sign up at http://www.mail.com/?sr=signup
>
>
>---
> > Visit the OpenCard web site at http://www.opencard.org/ for more
> > information on OpenCard---binaries, source code, documents.
> > This list is being archived at http://www.opencard.org/archive/opencard/
>
>! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
>! to
>!                           [EMAIL PROTECTED]
>! containing the word
>!                           unsubscribe
>! in the body.



---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/

! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
!                           [EMAIL PROTECTED]
! containing the word
!                           unsubscribe 
! in the body.

Reply via email to