问题描述:

Is there a java library or framework (other than the javax.comm provided by Sun) that is easy to use when accessing serial and parallel ports ( especially RS-232 ).

I need something free that will work both on Windows and Linux.

网友答案:

As andri pointed out RXTX is pretty much your best choice. There is an article on getting started with RXTX on Windows here (relating to RXTX 2.1).

网友答案:

The most common framework used for this is rxtx.

网友答案:

If free isn't necessary -- remember, your time isn't free -- then Serial IO SerialPort might be useful. It's the only thing I found that works as-is on all of the following:

  • 32/64-bit Windows
  • 64-bit Solaris (didn't test 32-bit)
  • 32 bit Linux (didn't test 64-bit)
  • Mac OS X

You do get source with the product, albeit with some weird and annoying build practices.

FWIW, I'm just a contented user, not affiliated with the company.

网友答案:

rxtx as the other posters have said. I've been using it and it works nicely. There is a problem if using nonstandard highspeed baudrates (multiples of 115200 e.g. 230400, 921600 are OK, but 1MB is not even if the hardware & underlying OS supports it), I've been told this will be corrected in rxtx 2.2.

相关阅读:
Top