Java Wrapper

Want to provide feedback to MemBrain or post/discuss suggestions for improvements or new features? Detected a bug that should be resolved in a future version?

Then this is the right place for your contribution!
vlsd
Posts: 3
Joined: Fri 8. Apr 2016, 12:13

Java Wrapper

Postby vlsd » Fri 8. Apr 2016, 12:20

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?

User avatar
TJetter
Posts: 267
Joined: Sat 13. Oct 2012, 11:04

Re: Java Wrapper

Postby TJetter » Sat 9. Apr 2016, 07:27

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?
Thomas Jetter

vlsd
Posts: 3
Joined: Fri 8. Apr 2016, 12:13

Re: Java Wrapper

Postby vlsd » Sat 9. Apr 2016, 09:04

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.

User avatar
TJetter
Posts: 267
Joined: Sat 13. Oct 2012, 11:04

Re: Java Wrapper

Postby TJetter » Sat 9. Apr 2016, 10:18

I suppose you have the library import directive in place?

Code: Select all

import de.membrainminusnn.MBDllWrapper;
Thomas Jetter

User avatar
TJetter
Posts: 267
Joined: Sat 13. Oct 2012, 11:04

Re: Java Wrapper

Postby TJetter » Sat 9. Apr 2016, 10:40

Can you also please post the MemBrain dll and wrapper versions (just hover the mouse over the corresponding dll files in Windows Explorer)?
Thomas Jetter

vlsd
Posts: 3
Joined: Fri 8. Apr 2016, 12:13

Re: Java Wrapper

Postby vlsd » Sat 9. Apr 2016, 18:07

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!!!


Return to “Feedback and Suggestions”