I am building a desktop Java application. It uses a third party framework for some low level work (it is in C and I have used JNA).
On my Windows Machine, when I do Native.loadLibrary("EDSDK.dll", EdSdkLibrary.class, options);
it works perfectly well. On Mac when I try to do Native.loadLibrary("EDSDK.framework", EdSdkLibrary.class, options);
it threw UnsatisfiedLinkError
saying: mach-o, but wrong architecture
My java 7 version is 64 bit and the framework is 32 bit based. On a different mac containing Java6, when I ran Java in 32 bit mode, the application works well. This confirms the exception thrown was because of 32 bit incompatibility and I need to use 32 bit only(which is obvious).
This is the irritating part- In Java 7, -d32
option doesn't work and Oracle no longer gives Java 7 in 32 bit. How do I run my Java 7 in 32 bit so that I can use the third party framework? Open JDK? Or use Java 6 and use it in 32 bit mode. But Oracle no longer provides Java 6 for Mac.
Any other alternative??
The easiest way to play 32-bit games on a Mac is to use an app such as CrossOver or Parallels. CrossOver use Wine to translate Windows applications into Mac commands. Parallels will create a virtual Windows machine on your Mac.
To download and install Java on your 32-bit operating system, the user needs to visit the official website of Oracle. One should know that Windowsx86 architecture refers to the architecture that is pre-64-bit. It means it is either for a 16-bit or 32-bit operating system.
Running the JDK InstallerThe file jdk-7<version>-windows-i586-i.exe is the JDK installer for 32-bit systems.
MacOS 10.14 Mojave, the version of the Mac operating system before macOS Catalina, is the last version that supports 32-bit software. With Catalina, only 64-bit software will be supported. (The current version of macOS is Monterey 12.
You can download the Apple Java 6 JDK, which does include a 32 bit JVM. But I doubt there will be much in the way of future security updates for Java 6, so you would be better off getting hold of a 64 bit version of the native framework and using that with Oracle Java 7.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With