I've struggled to correctly install and use the
Java Communications API. After following the directions very carefully and trying a number of ideas from forums like this one around the web, I've finally solved _my_ problem.
I'm running Win2k SP2 and J2SE 1.3.1. In addition, I installed JBuilder 5 Personal. Unfortunately, JBuilder was the culprit. Upon installation, it changed many settings that affected the way I work. I discovered this by running the following program, which I found in one forum that I visited:
In the output, I noticed many paths included JBuilder's compiler, runtime and other tools. Since JBuilder 5 Personal does not allow me to configure SDK's installed, I uninstalled it. Here's the kicker: When I then tried to run the above program from the command line, an error was returned stating that the runtime could not be found in the JBuilder path!!!
I uninstalled and reinstalled J2SE 1.3.1, and all settings were as I expected. I then removed CLASSPATH entries containing comm.jar, placed comm.jar in \Program Files\JavaSoft\JRE\1.3.1\lib\ext, placed javax.comm.properties in \Program Files\JavaSoft\JRE\1.3.1\lib, and placed win32com.dll in \Program Files\JavaSoft\JRE\1.3.1\bin. Finally, I very successfully ran some of the samples included withe the Java Communications API.
While I like JBuilder, it's no longer installed on my machine. I've been using IntelliJ's IDEA and like it better anyway. So beware of JBuilder's control over your settings; I assume solving the problem would've been a little easier if I were running the Professional or Enterprise edition -- maybe someone who is can post a little something about configuring installed SDK's.
I hope this _lengthy_ explanation has been helpful.
Craig