Fails to run: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native

960 views
Skip to first unread message

Holger Lembke

unread,
Dec 26, 2017, 3:58:07 PM12/26/17
to devel...@arduino.cc
I have cloned the IDE, pulled it, ant it and get what I expect.

With a little "annoyance": starting the IDE from WORK-folder fails with

Looking in classpath from sun.misc.Launcher$AppClassLoader@1961c42 for /com/sun/jna/win32-x86/jnidispatch.dll
Found library resource at jar:file:/C:/Users/x/Desktop/Arduino%20IDE%20Build/build/windows/work/lib/jna-4.2.2.jar!/com/sun/jna/win32-x86/jnidispatch.dll
DPI detection failed, fallback to 96 dpi
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
        at com.sun.jna.platform.win32.Shell32.<clinit>(Shell32.java:32)
        at com.sun.jna.platform.win32.Shell32Util.getFolderPath(Shell32Util.java:44)
        at com.sun.jna.platform.win32.Shell32Util.getFolderPath(Shell32Util.java:61)
        at cc.arduino.os.windows.Win32KnownFolders.getLocalAppDataFolder(Win32KnownFolders.java:53)
        at processing.app.windows.Platform.recoverSettingsFolderPath(Platform.java:65)
        at processing.app.windows.Platform.init(Platform.java:54)
        at processing.app.Base.<init>(Base.java:201)
        at processing.app.Base.main(Base.java:144)

No IDE for me. I have an idea what might go wrong, but really, I don't know.

Anyone with a quick help?

Andrew Kroll

unread,
Dec 26, 2017, 4:32:20 PM12/26/17
to Arduino Developers
That's not actually an error.
Although I don't use windows at all, Linux only here, I can totally tell you what that message means, and what the problem is, but not how to fix it.
The "problem" is that your monitor driver or video card driver is not reporting to the OS how many DPI (Dots Per Inch) you are running at.
So as far as I can tell you, if you want to get rid of that message, you will have to do a little research and either find out if there is an actual fix, or complain to the correct supplier of the particular driver that is causing the warning and switch-over to the default DPI.



--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.



--
Visit my github for awesome Arduino code @ https://github.com/xxxajk

Andrew Kroll

unread,
Dec 26, 2017, 4:33:47 PM12/26/17
to Arduino Developers
Oh and as far as the other error, it means what it says.

Holger Lembke

unread,
Dec 26, 2017, 5:18:26 PM12/26/17
to devel...@arduino.cc
Soooo.

As far as I see, the file gets the wrong permissions during build process. Windows complains while opening the security dialog, that permissions order is wrong and they won't work as expected. If I fix them by hand everything works. After the next build the permissions are wrong again.

I'm confused. Next step: mulled wine

Adrian Godwin

unread,
Dec 26, 2017, 5:23:31 PM12/26/17
to Developers
On Tue, Dec 26, 2017 at 10:18 PM, Holger Lembke <lem...@gmail.com> wrote:

I'm confused. Next step: mulled wine


A good plan, but one that can lead to further confusion.
 

Andrew Kroll

unread,
Dec 26, 2017, 5:54:41 PM12/26/17
to Arduino Developers
Try building it as the admin?

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

Holger Lembke

unread,
Dec 26, 2017, 6:21:01 PM12/26/17
to devel...@arduino.cc

Nah. Wiking inheritance. Works as designed.

I found that all build.xml-call of this failed.

  <target name="make-file-executable-windows" if="windows_host">
    <exec executable="icacls" failonerror="false">
      <arg value="${file}"/>
      <arg value="/grant"/>
      <arg value="Everyone:(RX)"/>
    </exec>
  </target>

Gave an error but no build break. That might not be a good idea, too. Anyway. I changed it to:

  <target name="make-file-executable-windows" if="windows_host">
    <exec executable="icacls" failonerror="false">
      <arg value="${file}"/>
      <arg value="/reset"/>
    </exec>
  </target>

that sets the valid permissions and all is well.


Reply all
Reply to author
Forward
0 new messages