Java JDK 32 位与 64 位 [英] Java JDK 32 bits vs 64 bits

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

问题描述

我正在创建一个非常简单的应用程序,它读取和显示文本文件并搜索它们.

I am creating a quite simple application which reads and display text files and search through them.

我在问自己是否有兴趣向用户推荐 32 位和 64 位版本.

I am asking myself if there is any interest for me to propose 32 and 64 bits version to the user.

区别仅在于可以使用 64 位版本访问更多的内存堆大小还是有任何其他兴趣?

Is the difference only in having access to more memory heap size with the 64 bit version or is there any other interest ?

32 位编译程序是否可以在 64 位 JVM 上运行(我假设是)

Will a 32 bit compiled program work on a 64 bits JVM (I assume yes)

推荐答案

任何 程序的 32 位和 64 位构建之间的唯一区别是机器字的大小、可寻址的数量内存,以及正在使用的操作系统 ABI.对于 Java,语言规范意味着机器字大小和操作系统 ABI 的差异根本无关紧要,除非您也使用本机代码.(本机代码必须构建为与加载它的 JVM 的字大小相同;你不能在没有非常奇特的情况下在同一进程中混合 32 位和 64 位构建确实编码,你不应该用 Java 来做这件事.)

The only differences between 32-bit and 64-bit builds of any program are the sizes of machine words, the amount of addressable memory, and the Operating System ABI in use. With Java, the language specification means that the differences in machine word size and OS ABI should not matter at all unless you're using native code as well. (Native code must be built to be the same as the word-size of the JVM that will load it; you can't mix 32-bit and 64-bit builds in the same process without very exotic coding indeed, and you shouldn't be doing that with Java about.)

这篇关于Java JDK 32 位与 64 位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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