-
Notifications
You must be signed in to change notification settings - Fork 146
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
NoClassDefFoundError: Could not initialize class jtermios.windows.WinAPI on Windows 10 with Java 12 #124
Comments
Can you test this on Java 11 or something earlier? I doubt you are the only one using Win 10 so I'm curious what is going on. JNA is not part of the project so it is trivial to use a different version (within reason) of JNA if that solves the issue. |
Used JDK: OS: Windows 10 64 bit PureJavaComm 1.0.3.RELEASE, JNA 4.2.2: Produces similar exceptions as above. So, it's basically the same. I agree, using a newer JNA is easy but out app is rather a legacy application and changing it would require lots of testing before going to production. Furthermore, the warning note from JNA's GitHub page ("JNI native support is typically incompatible between minor versions, and almost always incompatible between major versions.") is not too promising (although I'm not quite sure what it actually means). Fortunately it works with Java 12 on Linux and it seems that nobody uses this function on Windows so I guess I will not bother it. We got a bug report from QA and the same exception happened on Windows 7 64 bit too. So it does not seem OS specific but still could be specific to our app. |
Thanks for testing and report. Interesting, I will take this up with JNA people. I don't really understand what the JNA warning means. I've never seen any issues and as the Java type to native type mapping has never changed I don't see what could be the problem. The only issues I've ever had have been some minor changes to the Java API like when Java gave up the guarantee on order of fields which forced some changes to the API. |
I've created two PoC projects to make testing easier: https://github.com/palacsint/purejavacomm-tester They only call Used JDKs: JDK12: |
I just got bitten by this issue with an app packaged with Java 16 working on one of a client's machines, but not another. Turns out it was due to missing Microsoft Visual C++ 2010 Redistributables. |
I got the following errors on Windows 10 64 bit with Java 12:
Lib versions:
Updating JNA to 5.2.0 seem like a possible fix (the exception above are gone) but I don't have any environment for thorough testing.
The text was updated successfully, but these errors were encountered: