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
Try another one library: http://code.google.com/p/qextserialport/ This project targeted for Qt users. Supports Qt4 and Qt5 both!
In case you're looking for something lightweight with no additional dependencies, I'd like to plug my own library https://github.com/nullpunktTUD/SerialPort
It is fully cross-platform and supports enumeration.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.