“ The crash happened outside the Java Virtual Machine in native code.”how to solve this error (Java)?

时光总嘲笑我的痴心妄想 提交于 2019-12-06 02:29:26

i have found the solution to this problem ,

boolean Status=Kernel32.INSTANCE.WriteFile(HIDHandle, buffer, (int)buffersize, null, null);

the function doesn't accept two nulls , only one null can be passed to the function , so the correction example would be :

IntByReference bWritten = new IntByReference();
            /* Write Feature report */
           boolean Status=Kernel32.INSTANCE.WriteFile(HIDHandle, buffer, (int)buffersize, bWritten, null);
theglauber

I'm guessing you're using a Java library that has portions of it written in C (Java Native Interface). The error is happening in one of those C portions. Unless that library is something you have source code for that library, your only option would be to contact the vendor or look for an updated version.

But check this and see if it's related.

I reinstalled Eclipse. Installed a different version of JDK. Launched Eclipse as admin. None of the above worked.

Finally I found the solution from Richard Ayotte here: https://bugs.launchpad.net/ubuntu-gnome/+bug/1163501

Apparently, the tool tip window is the main culprit.

Solution: Locate the file eclipse.ini in your Eclipse installation directory. Put the following line in your eclipse.ini file (or AptanaStudio3.ini, if that is applicable to you) :

-Dorg.eclipse.swt.browser.DefaultType=mozilla

Save the file and restart Eclipse. Thank you, Rich !

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!