I had a look at other threads on serial ports but I still couldn't get mine to work. Where do I put the port number? Assume I'm trying to open comm 1. I want to make it really straightforward and do away with assigning variables for now.
What problems are you having? Are you getting compile errors? (I ask because there's a typo in your code snippet, where the 'l' is left out of "serialPort".)
Also, your import statements must come before the class declarations, not inside the class declarations... [ July 19, 2005: Message edited by: Jeff Bosch ]
Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4 all those years ago...)
posted 15 years ago
They're just typo errors. In my test program the import is outside the class. In the class SerialTest, when I did this:
An exception is thrown, and the error message is: "null". So, it seems it can't see a port.I havee the javax.comm.properties in my compiler's lib directory. This is the structure of my JBuilder, and where the API comm files are placed: