1

Here is my problem:

I cannot connect to serial port COM1 using ClipGem (Model: T-C912-B1) in a Java Applet.

I have verified that the Java class I built works as desktop application extending Frame and I can successfully capture signatures on COM1 and also on a ClipGem USB (Model: T-C912-HSB-R)

public class SigPlusSimpleDemo extends Frame

Next, I changed Frame to JApplet and try again using my new applet with the USB ClipGem to verify the applet is still successfully capturing signatures and USB still works as expected and it does.

However, when I try the same applet on serial port signature pad, I cannot connect to it. Remember, I already verified that it's working as a desktop application.

Does anyone know some reasons that can be causing this problem on COM1?

Has anyone experienced this problem?

Am I missing something?

Note: I am familiar with Java and have some programming experience, but I am no expert. Also, I have been going back and forth with Topaz Systems looking for a solution and I am currently waiting for another reply from them.

brady.vitrano
  • 2,256
  • 2
  • 16
  • 26
  • Have you checked the basic permissions and ensured you can do simple raw reading from the COM port in Java? – Earlz Jul 20 '11 at 21:21
  • COM1 works for same java code run from the command line, the problem comes when run as an applet in the browser. Do you believe this is a permissions issue? If so, where do I look (java.policy/security)? I have signed the applet jar. Any quick hacks to determine if permissions? – brady.vitrano Jul 20 '11 at 21:56
  • by "COM1 works" are you saying that directly access COM1 (not using Topaz libraries) works? I'm honestly not knowledgeable with Java but I looked at this question because I know some about the Topaz signature pads. It appears [you're not alone](http://www.google.com/?q=access+com+port+java+from+applet) though – Earlz Jul 20 '11 at 22:04
  • Works on com1 through desktop. Doesn't work in applet. I haven't tried COM1 in applet without topaz library. I will try that next – brady.vitrano Jul 20 '11 at 22:36
  • If you can, make a very minimal test case and post it here. That will help you get more people to help you (though sadly probably won't be in time for your bounty) – Earlz Jul 20 '11 at 22:38

2 Answers2

1

If the code works fine as a desktop application, a way to work around this issue would be to deploy your application as a Java Web Start application instead of an applet.

Emmanuel Bourg
  • 9,601
  • 3
  • 48
  • 76
  • This probably is the best answer. However, I am going to abandon getting COM1 to work with this applet. Maybe, I will come back to it. Our solution is going to be switch to all USB tablets. Thanks for suggestions. – brady.vitrano Jul 26 '11 at 14:19
0

Did you get a look at the Java console when running as an applet? You'll probably see the stacktrace of an exception.

Emmanuel Bourg
  • 9,601
  • 3
  • 48
  • 76