使用 Eclipse 在 64 位机器上编译 32 位 Java [英] Compile 32 bit Java builds on 64 bit machine with Eclipse

查看:39
本文介绍了使用 Eclipse 在 64 位机器上编译 32 位 Java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以标题中的问题,我需要在 32 位 Windows XP 系统上的 Tomcat 中运行我的服务器应用程序,我正在 Eclipse 中的 64 位 Windows 7 上工作和编译.如何将其编译为 32 位,我需要做什么?当我在 64 位机器上编译它时,我认为它不能在 32 位 Windows 上工作?

so the questions as in the title, I need to run my server application in Tomcat on a System which is 32 bit Windows XP, I am working and compiling on my 64 bit Windows 7 in Eclipse. How do I compile it to 32 bit, what do I need to do? I assume it won't work on the 32 bit Windows when I'm compiling it on a 64 bit machine?

推荐答案

Java 不构建 32 位或 64 位应用程序 - 字节码可跨不同位架构移植.

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

唯一的例外是您可能在代码中使用的本机库.如果有,那么您将不得不为相应的平台手动编译它们.否则,java 代码在 32 位和 64 位平台上是完全可移植的.

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.

这篇关于使用 Eclipse 在 64 位机器上编译 32 位 Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆