64 位 JVM 的 Java 编程 [英] Java programing for 64 bit JVM
问题描述
几个问题:):
如何识别当前安装的 JVM 是什么?(64 位/32 位)
How to identify what JVM is currently installed ? (64 bit / 32 bit)
在为 64 位 JVM 目标平台编程时是否需要做一些考虑?
Do I need to do some considerations while programming for 64 bit JVM target Platform ?
我的 Java 代码可以在 32 位和 64 位 JVM 上运行吗?
Can my Java code work on 32 bit as well as 64 bit JVM ?
如何在 64 位 JVM 上运行我的 Java 应用程序?
How to run my Java App on 64 bit JVM ?
如何确定我的 Java 应用程序使用的是什么 JVM?
How to identify what JVM is being used for my Java App ?
推荐答案
通常 64 位 jvm 会这样标识自己.
Normally a 64 bit jvm will identify itself as such.
我看到的 32/64 位注意事项:
32/64 bit Considerations I have seen:
- 地址空间 - 如果您不希望寻址超过 1.3Gb 的内存,那么您将看不到任何区别
- 原生库 - 如果您要加载任何 JNI 库,则它们需要与您的 VM 架构相匹配.例如,不要尝试从 64 位 vm(没有 -d32 类型的标志)加载 32 位本机库
是的,相同的代码将在两个 JVM 上运行.
Yes, the same code will run on both JVMs.
我认为系统属性sun.arch.data.model"具有 32/64 标志.
System Property "sun.arch.data.model" has the 32/64 flag I think.
这里有一些有用的信息:http://www.oracle.com/technetwork/java/hotspotfaq-138619.html
There's some helpful info here: http://www.oracle.com/technetwork/java/hotspotfaq-138619.html
这篇关于64 位 JVM 的 Java 编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!