Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a question #1

Open
software-engineer2008 opened this issue Nov 7, 2017 · 5 comments
Open

a question #1

software-engineer2008 opened this issue Nov 7, 2017 · 5 comments

Comments

@software-engineer2008
Copy link

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
Copy link
Owner

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

@software-engineer2008
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

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

@FractalizeR
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants