• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applets making JNI calls

 
sudarshan ramachandra
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I was exploring to read a smart card for a browser-based application.
I have with me a GemSafe GCR410 smart card reader and GemSafe smart cards. These cards can be read/accessed through VC++ api's provided by GemSafe. I have written to the card from a java application.
Now, I want to read the smart card through my applet. I am aware that the basic restriction of applets - that they cannot invoke dll's or native libraries directly. So I do have a wrapper class which calls classes making jni calls on dll's provided by GemSafe.
This works fine with appletviewer. I am able to invoke the applet which reads the smart card and displays the card content.
From the browser too, it works the same way, PROVIDED, I put 2(flat) dll's in the system folder and manually point the jar-file to the classpath on the client.
If not, it gives security exceptions and is not able to locate the dll's nor the jar-file.
I have put the related files in a jar and signed the jar,giving full access to the applet. Even then, it gives ClassNotFound exception for the class which makes jni calls, while it sits pretty in the jar file.
I don't want the client to do anything from his side like putting the dll's or setting classpath manually. I am looking at automating this process.
If someone has worked on something like this before or can figure out where I am going wrong? Do I have to do anything else? Any inputs are highly appreciated.
Best Regards,
sudarshan.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic