Compile 32 bit Java builds on 64 bit machine with Eclipse

折月煮酒 提交于 2019-12-02 05:44:16

Java doesn't build 32-bit or 64-bit applications - bytecode is portable across different bit architectures.

The only exception is native libraries that you might be using in your code. If there are any then you will have to manually compile those for the respective platform. Otherwise the java code is totally portable across 32-bit and 64-bit platforms.

The problem is your JNI DLL, which needs to be compiled for 32-bit to match the 32-bit JRE.

Java is independent of the OS.

You can compile with your 64bit machine and run this on a 32bit computer as long as this computer has a 32bit VM.

DusteD

If you're still searching for some "simple" solution, one would be to install a 32 bit os in a virtual machine and run eclipse from there.. Very ugly I know, but it works.

Another approach is mentioned here. How to launch java swing app which used precompled DLL from cmd?

You could install a 32bits jdk on a 64bits machine. point the JAVA_HOME to this jdk and use it. It

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