FractalizeR / IntelliJ-IDEA-Java-Card-Project-Template

Project template for Java Card applet development using IntelliJ IDEA IDE
http://www.fractalizer.ru
18 stars 15 forks source link

a question #1

Open software-engineer2008 opened 6 years ago

software-engineer2008 commented 6 years ago

hi

I run this sample for java card applet in Intellij IDEA witt doing all steps in readme....But I got this error .

java.lang.NullPointerException at javacard.framework.Applet.register(Applet.java:266) at helloWorld.HelloWorld.(HelloWorld.java:17) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:408) at java.lang.Class.newInstance(Class.java:433) at sun.applet.AppletPanel.createApplet(AppletPanel.java:799) at sun.applet.AppletPanel.runLoader(AppletPanel.java:728) at sun.applet.AppletPanel.run(AppletPanel.java:378) at java.lang.Thread.run(Thread.java:745)

would you please help me?

thanks

FractalizeR commented 6 years ago

Try to call parent constructor by calling super() before register() in HelloWorld().

software-engineer2008 commented 6 years ago

thanks. I did it but I got this error again. Should I change the config in the bellow image? would you help me? screenshot 113

FractalizeR commented 6 years ago

I thnik this is an emulator problem. Exception happens on Applet.java:266. This is a line where SimulatorSystem.registerApplet(this); happens if you use JC 2.2.2.

software-engineer2008 commented 6 years ago

So, should I use other library (Egate) because of that error?

FractalizeR commented 6 years ago

You can try, but that would be for a real card only. You can't use real egate libraries at Emulator.