Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xbee-java crashing with newer java versions #161

Open
msoldin opened this issue Feb 4, 2022 · 3 comments
Open

xbee-java crashing with newer java versions #161

msoldin opened this issue Feb 4, 2022 · 3 comments

Comments

@msoldin
Copy link

msoldin commented Feb 4, 2022

Why
xbee-java is crashing with newer java systems like JDK11. As far as I know, this only affects 64 bit versions of Java, as the rxtx library is simply too old. I know the compatibility only says Java 8, but Java 8 is no longer supported with updates. I find it an absurdity to expose software to such security risks for customers.

What
Replace the rxtx-Library with newer code libraries or write an own wrapper for it.

@bramvdpol
Copy link

Since there was a recent release of this library apparently development is still done on it; Please make this a priority! The only way to use the xbee-java library on recent windows version is by using an ancient JRE8 version - JRE251 from 2020 or older.

This is not acceptable for production use!

Related: https://stackoverflow.com/questions/63157940/serial-port-reading-error-exception-access-violation-c-rxtxserial-dll0x5

@msoldin
Copy link
Author

msoldin commented Jun 13, 2022

@bramvdpol i totally agree on you, but as a short fix you can replace the serial library by sacrificing the unit tests. I already did that for my master thesis, seems to work fine. Still not an elegant solution, because the tests are missing.

https://github.com/msoldin/xbee-java-nrjavaserial

You could also use the 32 bit version of newer OpenJDK versions. The problem is not Java itself, only that the old serial library is only supporting 32 bit.

@bramvdpol
Copy link

All right, thanks for your insight! That does provide some workarounds for the time being. I think I prefer untested code that at least runs on the latest JRE compared to the current situation. I will also look into OpenJDK, that might be the best option for now.
Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants