licel / jcardsim

https://jcardsim.org
222 stars 123 forks source link

ClassCastException: .. cannot be cast to java.desktop/java.applet.Appel #117

Open LDami opened 6 years ago

LDami commented 6 years ago

Hi, When I try to build my projet on IntelliJ with the .jar file included (in files-project structure-module-dependencies), i've an error !

My code:

public  class myWallet extends javacard.framework.Applet
{
 ....
}

Error: java.lang.ClassCastException: myWallet cannot be cast to java.desktop/java.applet.Applet

Thanks in advance. Damien.

licel commented 6 years ago

Check your import section, it looks that you use in the code java.applet.Applet instead of javacard.framework.Applet.

LDami commented 6 years ago

Hi, It's correct, I use java.applet.Applet and not the other one, i dont understand !

licel commented 6 years ago

You need to import javacard.framework.Applet instead of the java.applet.Applet.