How cany I avoid a java namespace clash between different versions of the same library?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I'm trying to use a java class I wrote for controlling a lab instrument via serial port. This java class is using nrjavaserial, a fork of the RXTX serial library shipped with Matlab (as of 2017a). Both RXTX and nrjavaserial unfortunately use the same namespace gnu.io.*, and trying to use both libraries at the same time will not work.
Of course I could switch back to using RXTX (which at this point has been unmaintained for several years and has a list of known problems) for compatibility's sake, but I'd prefer using nrjavaserial. Is there a way prohibit the loading of a shipped library so that a namespace clastoh won't happen? Or should I just rip RXTXcomm.jar from my installation, or rename nrjavaserial.jar and drop it into its place (I guess I'd have to expect some negative fallout from either option...)?
Best,
Andreas
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Call Java from MATLAB dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!