Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Javax.comm's bug

  Asked By: Lucina    Date: Aug 20    Category: Java    Views: 692

I don't know if someone has been posting this problem.

I got problem with javax.comm API for serial communication.

I have write code for send/receive data through RS232 and compile as
java.class. It is run properly, but when I copy it become an applet
or in EJB it cannot execute this code:

portList = CommPortIdentifier.getPortIdentifiers();

So I never open the port communication.

I have add code bellow to fix the problem:
String driverName = "com.sun.comm.Win32Driver"; //(under windows)
try {
CommDriver driver = (CommDriver) Class.forName(driverName).newInstance
} catch (Throwable e) {
// Arf!
But I still cannot fix the problem. Please tell me what should I do
to solved the problem.



2 Answers Found

Answer #1    Answered By: Jeffrey Washington     Answered On: Aug 20

this isn't a bug, you don't have any permission to get the system's ports
within an applet...
and it doesn't make sense to use it within EJB...

Answer #2    Answered By: Landra Schmidt     Answered On: Aug 20

It is a bug. I found the same problem  on the net, even in java

I have followed the instruction I found on the net, but it cannot solved my
problem yet. Maybe someone here ever faced this problem also.

Didn't find what you were looking for? Find more on Javax.comm's bug Or get search suggestion and latest updates.