This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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, SCJD in progress, if you can call that progress...)
Joined: Mar 02, 2005
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: