tinyCoder
tinyCoder

Reputation: 360

make a DLL work on MacOS

I have a Jar application that I use on Windows, it uses some DLL files to send and receive messages from them, so i'm trying to find a way to make it work on MacOS, I tried to run the jar first to see what will happen:

java -cp myApp.jar

It worked until the time that the app requires one of the DLLs, so I got this:

/Users/XXX/Java/bin/myDLL.dll: unknown file type, first eight bytes: 0x4D 0x5A 0x90 0x00 0x03 0x00 0x00 0x00

I found some tips to use Wine, but I don't have any idea how to convert those DLLs so the app can use them on MacOS.

Note: The Jar app has many files like DLLs, GIFs, and INI files that are needed to work.

Upvotes: 1

Views: 1229

Answers (1)

John Bollinger
John Bollinger

Reputation: 180048

Java itself is cross-platform, but native code such as your DLL is not. Under no circumstances can you expect to load a Windows DLL directly into your OS X JVM and run anything within. You could, however, run your code on OS X in a Windows JVM via a Windows emulation layer such as Crossover Mac or Parallels Desktop. Note that these are both commercial products, however, as are most others in this category, and also that OS emulation imposes a performance cost.

Upvotes: 2

Related Questions