jrxtx | The Java serial communication library | Wrapper library
kandi X-RAY | jrxtx Summary
kandi X-RAY | jrxtx Summary
In addition to the original RXTX API jRxTx provides a new API with the following advantages:.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of jrxtx
jrxtx Key Features
jrxtx Examples and Code Snippets
Community Discussions
Trending Discussions on jrxtx
QUESTION
I want to change the serial library of my application from purejavacomm to jRxTx. This should be relatively easy since they have very similar functionality.
But since my application with purejavacomm is well tested and trusted by my customers and with jRxTx it is not I want to include both libraries in my code.
So when I see a problem with the jRxTx implementation in a customer system I can just delete the jRxTx.jar from the customer PC and it automatically uses purejavacomm again.
I wanted to write a small test programm for this to see if I could just catch the NoClassDefFoundError when the jRxTx.jar is not there and use the purejavacomm instead but that does not seem to work.
...ANSWER
Answered 2019-Sep-11 at 15:45I solved this problem by writing wrapper classes for each library, which implement a common interface. This Interface has a static getInstance()
method, which looks in the classpath for the jRxTx.jar
file and if it doesn't find it the interface returns the purejavacomm class.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jrxtx
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page