Page 1 of 1

Java Wrapper

Posted: Fri 8. Apr 2016, 13:20
by vlsd
I am trying to use Java Wrapper, but i keep getting errors like this

Code: Select all

Exception in thread "main" java.lang.UnsatisfiedLinkError: jnitest.MBDllWrapper.GetLastError()I
	at jnitest.MBDllWrapper.GetLastError(Native Method)
	at jnitest.JNITest.main(JNITest.java:21)
no matter what method i call.
I am running Windows 10 64 bit, tried both 32 and 64 java environments, but it still does not work. Do you have any idea why this happens?

Re: Java Wrapper

Posted: Sat 9. Apr 2016, 08:27
by TJetter
Seems like Java does not find the wrapper dll or the MemBrain dll.
Try the following:
Copy both the wrapper and the MemBrain dll files to C:\Windows\SysWOW64

I.e. the files:
- MBDllWrapper.dll
- MBDllWrapper64.dll
- MemBrainDll.dll
- MemBrainDll64.dll

All files can be found in
C:\Program Files (x86)\MemBrain\DLL

Does that help?

Re: Java Wrapper

Posted: Sat 9. Apr 2016, 10:04
by vlsd
Thanks for the reply, but that is not the case, if i remove MBDLLWrapper64.dll from "java.library.path" i get this

Code: Select all

Exception in thread "main" java.lang.UnsatisfiedLinkError: no MBDllWrapper64 in java.library.path
and if i remove MemBrainDll64.dll then this

Code: Select all

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Windows\System32\MBDllWrapper64.dll: Can't find dependent libraries
Edit: folder C:\Windows\SysWOW64\ is not in my "java.library.path", but i think i should be able to load library from any path specified in "java.library.path" property.

Re: Java Wrapper

Posted: Sat 9. Apr 2016, 11:18
by TJetter
I suppose you have the library import directive in place?

Code: Select all

import de.membrainminusnn.MBDllWrapper;

Re: Java Wrapper

Posted: Sat 9. Apr 2016, 11:40
by TJetter
Can you also please post the MemBrain dll and wrapper versions (just hover the mouse over the corresponding dll files in Windows Explorer)?

Re: Java Wrapper

Posted: Sat 9. Apr 2016, 19:07
by vlsd
Thank you very much

Code: Select all

import de.membrainminusnn.MBDllWrapper;
Importing class into project made it work in netbeans, i dont know how to add class normally in ide i'm working in, but now i know the cause of my problem.
Thanks again, you helped a lot!!!