Hi all,
I have a signed applet that reads information from Card Reader. When I
run this applet from client machine with a Card Reader, it cant get
information from the card. But I plug out the Card Reader and plug in
to the server, it works.
As I know, the applet runs on the client machine. But in my case, it
only accesses server devices. So anyone can suggest me a solution to my
problem. I already sign this applet and have a .java.policy with full
acccess also.
Thanks a lot for viewing and suggestions!
Andrew Thompson - 22 Oct 2005 14:05 GMT
> ...I already sign this applet and have a .java.policy with full
> acccess also.
If your applet is properly signed, the java policy file
should be redundant. This makes me wonder..
- Is either method of gaining increased privileges working properly?
- Are you swallowing exceptions?
<http://www.physci.org/codes/javafaq.jsp#stacktrace>
- Where is the applet? (URL)
<http://www.physci.org/codes/sscce.jsp#eg>
- Where is the applet code? (URL)
<http://www.physci.org/codes/sscce.jsp>
CrazyJerry - 22 Oct 2005 18:06 GMT
Thanks for your reply.
- Is either method of gaining increased privileges working properly?
I do not understand what you mean. My applet can access client file,
can communicate with server through socket. I used logging and saw that
the applet stops right before accessing Card Reader.
- Are you swallowing exceptions?
No. I check exceptions very careful and I do logging also.
- Where is the applet? (URL)
- Where is the applet code? (URL)
On the server, the root contains : CardApplet.html, CardApplet.jar
and CardApplet.class
The code of CardApplet.html is :
"<HTML>
<HEAD>
</HEAD>
<BODY BGCOLOR="000000">
<CENTER>
<APPLET
code = "CardApplet.class"
archive = "CardApplet.jar"
width = "500"
height = "300"
>
</APPLET>
</CENTER>
</BODY>
</HTML>"
On the client, I access applet through URL:
http://crazyjerry.dyndns.org:8080/CardApplet.html
It is very funny. Since my program keeps looping to check card, when
card reader on client machine, it hang. Then I move card reader to
server, the applet continues -.-".
Thanks for viewing and any suggestions!
Roedy Green - 23 Oct 2005 11:15 GMT
>It is very funny. Since my program keeps looping to check card, when
>card reader on client machine, it hang. Then I move card reader to
>server, the applet continues -.-".
There is a strong possibility the fault likes with the way the card
reader or port is attached, configured, drivered, etc. You must
eliminate that.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
CrazyJerry - 23 Oct 2005 20:05 GMT
Thanks a lot for your suggestions man, the applet works already!
Thanks again and best regards!
Roedy Green - 23 Oct 2005 23:02 GMT
>Thanks a lot for your suggestions man, the applet works already!
>
>Thanks again and best regards!
What was the key thing you did to get it going?

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
Roedy Green - 23 Oct 2005 11:14 GMT
>I have a signed applet that reads information from Card Reader. When I
>run this applet from client machine with a Card Reader, it cant get
>information from the card. But I plug out the Card Reader and plug in
>to the server, it works.
turn the applet into a hybrid application. See
http://mindprod.com/jgloss/applet.html#HYBRID for how.
Debug that. That gets the Applet/security stuff out the way. It also
makes it easier to run debuggers. Then add the Applet/security. If
you can't get it to work, give up. Use JAWS instead to run your
Applet/application.
See http://mindprod.com/jgloss/javawebstart.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.