views:

73

answers:

3

Hey friends i am using the javax.comm API to help my program communicate to a hardware over the serial port. I am using the Windows 7, and netbeansIDE9. i used the common java program to check the available ports on my PC. the program compiled and run with out error. however,it returned nothing. can anybody tell me what i can do to use the javax.comm API on windows? it seem the win32com.dll does not work with 64-bit Operating system

A: 

it seem the win32com.dll does not work with 64-bit Operating system

I think that is correct. In fact, according to the relevant download page, Oracle no longer supports the javax.comm API for any Windows platform.

However, I found this page which has a 64bit build of the DLL, among other things.

EDIT

By an astounding piece of research (i.e. following the links and reading stuff) I found the download page for the latest RXTX, which claims to have binaries for various platforms. If your platform is not there, try building from source. If that doesn't work, consider investing the effort in making it work.

Stephen C
Thank you Stephen, i visited the link http://www.euclideanspace.com/software/language/java/comm/ you referred to and i see that this package is for Linux. I wanted a package for the windows however.
Nathi
A: 

Have you got a look on RXTX ? I think it is still active.

PeterMmm
Hi Peter I have got the RXTX, but I have problems on how to use it. I wish I could get few sample code that uses RXTX
Nathi
It is all explained here http://rxtx.qbang.org/wiki/index.php/Using_RXTX , did you read this ?
PeterMmm
A: 

Recent 2.2pre versions of RXTX include binaries for 64-bit windows. I think the latest RXTX information source has changed to this: http://rxtx.qbang.org instead of http://www.rxtx.org though.

At one point the RXTX library included drop-in support for using the javax.comm api. I'm not sure if it still does, but the main change then to use the "native" RXTX packaging was primarily just a package name change.

kaliatech
Are you saying that the rxtx package has the same classes and methods as does the javax.comm? i am not sure if i can use the same same same procedure as i did on the javax.comm.
Nathi
In an older versions of RXTX, yes. You could use the javax.comm packages and classes of the Java COMM API, with RXTX being a simple drop-in implementation replacement. In newer versions of RXTX, you will need to change imported packages from "javax.comm.*" to "gnu.io.*". Other than that, classes and API will be probably 99% the same. Compare the two API's here: http://rxtx.qbang.org/wiki/index.php/Development .
kaliatech