Java 7 to be run in 32 bit on mac

一笑奈何 提交于 2019-12-23 08:53:30

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/15111743/java-7-to-be-run-in-32-bit-on-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!