3

Possible Duplicate:
How to get javax.comm API?

I have downloaded and installed jdk1.7.0_07 and try to run a COM port Listener program. But i got error "package javax.comm does not exist". I would like to know whether javax package is available in JDK itself or shall i have to download it separately. Also if i have to download it separately, where can i download the javax package?

Community
  • 1
  • 1
Ramprasad
  • 7,981
  • 20
  • 74
  • 135

2 Answers2

5

It's a separate download. If you're using a build tool which manages dependencies (which i highly recommend!), you can get it from Maven Central at javax.comm:comm:3.0-u1.

As well as the API library itself, you will need an implementation. The de facto standard seems to be RXTX, which is also available via Maven Central. For reasons best known to themselves, the RXTX developers have actually stopped supporting the javax.comm API; the latest release that supported it was 2.0.x. That is available on Maven Central at org.rxtx:rxtxcomm:2.0-7pre1.

If you don't mind giving the up the standard API, there are also newer releases at org.rxtx:rxtx:2.1.7. Apparently, the new API is the same, just under a different package name. Which makes it even more baffling that they changed it!

Tom Anderson
  • 46,189
  • 17
  • 92
  • 133
  • The official explanation (from the INSTALL file): rxtx 2.1 replaces the entire CommAPI. Every effort is made to conform to CommAPI but out of respect for our friends at Sun the package name of 2.1 has been moved to gnu.io. – tor Feb 19 '13 at 00:14
  • Thanks for the quote. Sadly, that still doesn't make any sense. – Tom Anderson Feb 19 '13 at 10:27
0

I tried looking for it in the link provided by @Colin, but could not locate it either. Anyway, I got some additional (optional) information that you may find useful. It is here

ilango
  • 1,277
  • 3
  • 13
  • 19