i need to manage a COM printer port by Tomcat webserver. I tried a lot of java solutions, for example RxTx library but i had a lot of troubles: when i switch off the printer the jvm crashed!!
Now i would like to use an jvm external library linked by JNA, so i need a C or C++ library with raw methods to read and write to a COM port. This library should be compile under windows or linux. Can I find somethings already done? (I can not write programs in C or C++).
Thank you.
Use Boost Asio!
Its guaranteed to be fully portable. Its also very reliable. I’ve actually used it in my own application (SMS sender through gsm devices using AT commands).
Please also see: Access the serial port in a platform-independant way