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

查看:169
本文介绍了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,语言规范意味着机器字大小和OS 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天全站免登陆