简体   繁体   中英

How to use a native windows DLL inside a Linux JVM

I've got an simple API with native functions(JNA) inside a DLL file which only calculates some mathematical stuff. I am using this DLL inside an JAVA application and everything works fine on the windows JVM.

The problem is that this library is going to be used in a Linux enviroment inside a Linux JVM and there will be no *.so version.

I read a couple of times that there is a way to load the DLL with wine inside the memory and use it from there but without explanations how to do it.

Can somebody confirm or refute this approach for me. And could tell me how to do it if this is really a possible sollution, please?

edit: Could be a solution which is described in How to call Wine dll from python on Linux? Can I somehow use ctypes?

Regards wurmi

I think you should be able to do this, but I can't find a step-by-step guide, and I haven't done it myself. Try doing the following:

Good luck!

Hopefully someone who has done this before will provide a more detailed answer here. If not, be sure to post how to do it as an answer so that others can benefit :-)

(The answer you linked to is referring to Windows-provided DLLs, and Wine ships with so-compiled versions of those.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM