Skip to content

JNA library conflict / not using supplied JNA #1948

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

Closed
pfeerick opened this issue Mar 22, 2014 · 2 comments
Closed

JNA library conflict / not using supplied JNA #1948

pfeerick opened this issue Mar 22, 2014 · 2 comments
Milestone

Comments

@pfeerick
Copy link
Contributor

The JNA library will, by default, first check the system for jnidispatch.dll rather than extract it from the jar.

There's an issue when Arduino starts in 32-bit mode and then suddenly tries to load 64-bit jnidispatch.dll from the system path. Also, there is the issue of a conflicting version of jnidispatch.dll being present and mistakenly used.

Symptoms on Arduino 1.0.5r2 are seeing the splash screen, and then nothing. Arduino 1.5.6r2 shows the splash screen for longer, and then shows a "Launch4j: An error occurred while starting the application" message. If you work out how to display debug messages, you will get "java.lang.UnsatisfiedLinkError" and "com.sun.jna.Native.pointerSize()I"

This issue is comes from Processing, and has been reported here: processing/processing#2239

Resolution is simple - set the jna.nosys Java property to true i.e. -Djna.nosys=true

@cmaglie cmaglie added this to the Release 1.5.7 milestone Mar 25, 2014
@chital
Copy link

chital commented Jun 4, 2014

Can you please tell how to set this property...?

@cmaglie
Copy link
Member

cmaglie commented Sep 12, 2014

Should be solved with #2301, please follow up there.

@cmaglie cmaglie closed this as completed Sep 12, 2014
cmaglie added a commit to cmaglie/Arduino that referenced this issue Jan 17, 2015
from: processing/processing#2239

  If there's is some other Java program installed that uses JNA and
  jnidispatch.dll happens to be in the path then JNA in Processing
  will try to load it and probably crash due to some version mismatch.

  The issue can easily be solved by setting jna.nosys to make sure JNA
  will always extract the correct native lib from it's jar and ignore
  any libs in the system path:

    -Djna.nosys=true

Fix arduino#1948
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

3 participants